1gensio_set_callback(3)     Library Functions Manual     gensio_set_callback(3)
2
3
4

NAME

6       gensio_set_callback,  gensio_get_user_data,  gensio_set_user_data - Set
7       the event callback and user data for a gensio
8

SYNOPSIS

10       #include <gensio/gensio.h>
11
12       void gensio_set_callback(struct gensio *io,
13                           gensio_event cb, void *user_data)
14
15       void gensio_set_user_data(struct gensio *io, void *user_data);
16
17       void *gensio_get_user_data(struct gensio *io)
18

DESCRIPTION

20       gensio_set_callback sets the event handler and  data  for  the  gensio.
21       This  must  be done in the GENSIO_ACC_EVENT_NEW_CONNECTION event from a
22       gensio_accepter before any other operation is done on the gensio.   The
23       only  exception  is  that gensio_close may be called with callbacks not
24       set.  This function may be called again if the gensio  cannot  generate
25       any callbacks, generally after it has been closed.  Otherwise race con‐
26       ditions may occur.
27
28       gensio_set_user_data Just sets the user_data field in the  gensio.   If
29       this is called when the gensio is running, race conditions may occur.
30
31       gensio_get_user_data Return the user data passed in with the gensio was
32       created or set by one of the above two functions.
33

SEE ALSO

35       gensio(5), gensio_event(3), gensio_accepter_event(3)
36
37
38
39                                  23 Feb 2019           gensio_set_callback(3)
Impressum