mtcp_create_context − create mTCP context for network communication
mctx_t mtcp_create_context(int cpu);
mtcp_create_context() creates the underlying mTCP stack based on the parameters passed by the mtcp_init() function call. Each mTCP thread requires its own exclusive invocation of the mtcp_create_context() routine before the stack can be used for network communication. The function requires a sole cpu integer argument that passes the CPU core-id of the system on which the stack is instantiated.
Returns mctx on success; NULL on failure. Please see the NOTES section for details.
The user cannot call mtcp_create_context() function more than once using the same cpu-id in a process.
Passing an invalid CPU core-id (value < 0 or value > max_cpus) will prevent the creation of the mTCP stack.
It is suggested that the user creates only 1 mTCP context thread per core for performance reasons.
mTCP development team <firstname.lastname@example.org>
mtcp_destroy_context(), mtcp_init(), mtcp_destroy()
This page is part of mTCP release 3.0 docs section. A description of the project, and information about reporting bugs, can be found at http://shader.kaist.edu/mtcp/.