1CK_ARRAY_INIT(3)         BSD Library Functions Manual         CK_ARRAY_INIT(3)
2

NAME

4     ck_array_init — initialize a pointer array
5

LIBRARY

7     Concurrency Kit (libck, -lck)
8

SYNOPSIS

10     #include <ck_array.h>
11
12     bool
13     ck_array_init(ck_array_t *array, unsigned int mode,
14         struct ck_malloc *allocator, unsigned int initial_length);
15

DESCRIPTION

17     The ck_array_init(3) function initializes the array pointed to by the
18     argument array.  The mode value must be CK_ARRAY_MODE_SPMC.  The
19     allocator argument must point to a ck_malloc data structure with valid
20     non-NULL function pointers initialized for malloc, free and realloc. The
21     initial_length specifies the initial length of the array. The value of
22     initial_length must be greater than or equal to 2. An array allows for
23     one concurrent put or remove operations in the presence of any number of
24     concurrent CK_ARRAY_FOREACH operations.
25

RETURN VALUES

27     This function returns true if the array was successfully created. It
28     returns false if the creation failed. Failure may occur due to internal
29     memory allocation failures or invalid arguments.
30

SEE ALSO

32     ck_array_commit(3), ck_array_put(3), ck_array_put_unique(3),
33     ck_array_remove(3), ck_array_deinit(3) ck_array_length(3),
34     ck_array_buffer(3), ck_array_initialized(3), CK_ARRAY_FOREACH(3)
35
36     Additional information available at http://concurrencykit.org/
37
38                               October 18, 2013
Impressum