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

NAME

6       gensio_open,  gensio_open_s, gensio_open_nochild, gensio_open_nochild_s
7       - Start a connecting gensio
8

SYNOPSIS

10       #include <gensio/gensio.h>
11
12       typedef void (*gensio_done_err)(struct gensio *io, int err,
13                           void *open_data);
14
15       int gensio_open(struct gensio *io, gensio_done_err open_done,
16                           void *open_data);
17
18       int gensio_open_s(struct gensio *io);
19
20       int gensio_open_nochild(struct gensio *io, gensio_done_err open_done,
21                           void *open_data);
22
23       int gensio_open_nochild_s(struct gensio *io);
24

DESCRIPTION

26       gensio_open starts the gensio.  gensios received from an  accepter  are
27       open  upon  receipt, but connecting gensios are started closed and need
28       to be opened before use.  If no error is returned, the open_done  call‐
29       back will be called, if there is no error in the callback err value the
30       gensio will be open.  This will open all children, too.
31
32       Note that the open_done callback will always  be  called  even  if  you
33       close  the  gensio before the open_done callback happens or if an error
34       occurs.  This is guaranteed.
35
36       gensio_open_s is like gensio_open, but waits for the open to  complete.
37       Normal gensio processing will happen while waiting.  Note that you must
38       be careful to not call this from a callback, you should only call  this
39       from  a non-callback thread or a runner (see gensio_os_funcs(3) for de‐
40       tails on runners).
41
42       gensio_open_nochild is like gensio_open, but assumes any child  gensios
43       are already open and just opens this gensio.  This can be useful if you
44       have a gensio that is already opened (like you received it from an  ac‐
45       cepter) and you want to stack another gensio on top of it.  Only filter
46       gensios will support this.
47
48       gensio_open_nochild_s is like gensio_open_nochild, but  waits  for  the
49       open to complete.  See the notes on gensio_open_s above for warnings.
50

RETURN VALUES

52       Zero is returned on success, or a gensio error on failure.
53

SEE ALSO

55       gensio_err(3), gensio(5), gensio_os_funcs(3)
56
57
58
59                                  27 Feb 2019                   gensio_open(3)
Impressum