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

sergensio_b_alloc, sergensio_b_free, sergensio_baud_b, sergensio_datasize_b, sergensio_parity_b,

Author

       Corey Minyard <minyard@acm.org>

                                                   20 Jul 2020                            sergensio_b_alloc.3(3)

Description

       These  are  equivalent to the non-blocking functions (without the _b), but block waiting for the results.
       Like all synchronous I/O, this can come with deadlock potential, so these should be used carefully.

       To use these, you must first allocate a sergensio blocking data structure using sergensio_b_alloc for use
       in the other functions.  This allocated value can only be used for one operation at a time.  When you are
       done with it, you must free it with sergensio_b_free.

       With these function, you pass a pointer to the value you want to set.  If the pointed to value  is  zero,
       the  value  is not set, just fetched.  If the function returns without an error, the actual current value
       is returned in the passed-in pointer's destination.

       Note that these do not  require  gensio_set_sync  to  work,  and  may  be  intermixed  with  non-blocking
       operations.

       See the various non-blocking functions for detail on the values and what they mean.

Name

       sergensio_b_alloc,    sergensio_b_free,   sergensio_baud_b,   sergensio_datasize_b,   sergensio_parity_b,
       sergensio_stopbits_b,     sergensio_flowcontrol_b,     sergensio_iflowcontrol_b,      sergensio_sbreak_b,
       sergensio_dtr_b, sergensio_rts_b - Blocking control for serial parameters on a sergensio

Return Values

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

See Also

sergensio(5),   sergensio_baud(3),   sergensio_datasize(3),  sergensio_parity(3),  sergensio_stopbits(3),
       sergensio_flowcontrol(3),     sergensio_iflowonctrol(3),      sergensio_sbreak(3),      sergensio_dtr(3),
       sergensio_rts(3)

Synopsis

#include<gensio/sergensio.h>intsergensio_b_alloc(structsergensio*sio,structgensio_os_funcs*o,structsergensio_b**new_sbio);voidsergensio_b_free(structsergensio_b*sbio);intsergensio_baud_b(structsergensio_b*sbio,unsignedint*baud);

       int sergensio_datasize_b(struct sergensio_b *sbio,
                           unsignedint*datasize);intsergensio_parity_b(structsergensio_b*sbio,unsignedint*parity);intsergensio_stopbits_b(structsergensio_b*sbio,unsignedint*stopbits);intsergensio_flowcontrol_b(structsergensio_b*sbio,unsignedint*flowcontrol);intsergensio_iflowcontrol_b(structsergensio_b*sbio,unsignedint*iflowcontrol);intsergensio_sbreak_b(structsergensio_b*sbio,unsignedint*breakv);intsergensio_dtr_b(structsergensio_b*sbio,unsignedint*dtr);intsergensio_rts_b(structsergensio_b*sbio,unsignedint*rts);intsergensio_cts_b(structsergensio_b*sbio,unsignedint*cts);intsergensio_dcd_dsr_b(structsergensio_b*sbio,unsignedint*dcd_dsr);intsergensio_ri_b(structsergensio_b*sbio,unsignedint*ri);

See Also