cthreadcomm · Section 3
ceventloop_declare
NAME
ceventloop_declare - declare an uninitialised ceventloop variable
LIBRARY
C Collections (libccollections, -lccollections)
SYNOPSIS
#include <ccollections/cthreadcomm.h> ceventloop_declare(name);
DESCRIPTION
Expands to `ceventloop name` and leaves the variable uninitialised, so you must assign it with ceventloop_construct() or a ceventloop_create*() call before you use it. It is there so that the names match the other c_collections modules, in the same way as cthrpool_declare().
PARAMETERS
name Variable name to declare.
EXAMPLES
ceventloop_declare(loop); char *err = NULL; loop = ceventloop_create(32, 1, 1, &err); if (!loop) { fprintf(stderr, "%s\n", err); exit(1); } /* ... register selectables ... */ ceventloop_destroy(loop);
SEE ALSO
ceventloop_declare_scoped(3), ceventloop_construct(3), ceventloop_create(3)