logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

gensio_open, gensio_open_s, gensio_open_nochild, gensio_open_nochild_s - Start a connecting gensio

Description

gensio_open  starts  the gensio.  gensios received from an accepter are open upon receipt, but connecting
       gensios are started closed and need to be opened before use.  If no  error  is  returned,  the  open_done
       callback  will  be  called, if there is no error in the callback err value the gensio will be open.  This
       will open all children, too.

       Note that the open_done callback will always be called even if you close the gensio before the  open_done
       callback happens or if an error occurs.  This is guaranteed.

       gensio_open_s  is  like  gensio_open,butwaitsfortheopentocomplete.Normalgensio processing will
       happen while waiting.  Note that you must be careful to not call this from a callback,  you  should  only
       call this from a non-callback thread or a runner (see gensio_os_funcs(3) for details on runners).

       gensio_open_nochild  is  like  gensio_open, but assumes any child gensios are already open and just opens
       this gensio.  This can be useful if you have a gensio that is already opened (like you received  it  from
       an accepter) and you want to stack another gensio on top of it.  Only filter gensios will support this.

       gensio_open_nochild_s  is like gensio_open_nochild, but waits for the open to complete.  See the notes on
       gensio_open_s above for warnings.

Name

       gensio_open, gensio_open_s, gensio_open_nochild, gensio_open_nochild_s - Start a connecting gensio

Return Values

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

See Also

gensio_err(3), gensio(5), gensio_os_funcs(3)

                                                   27 Feb 2019                                    gensio_open(3)

Synopsis

#include<gensio/gensio.h>typedefvoid(*gensio_done_err)(structgensio*io,interr,void*open_data);intgensio_open(structgensio*io,gensio_done_erropen_done,void*open_data);intgensio_open_s(structgensio*io);intgensio_open_nochild(structgensio*io,gensio_done_erropen_done,void*open_data);

       int gensio_open_nochild_s(struct gensio *io);

See Also