1sergensio_b_alloc.3(3)     Library Functions Manual     sergensio_b_alloc.3(3)
2
3
4

NAME

6       sergensio_b_alloc,  sergensio_b_free, sergensio_baud_b, sergensio_data‐
7       size_b,  sergensio_parity_b,  sergensio_stopbits_b,  sergensio_flowcon‐
8       trol_b,  sergensio_iflowcontrol_b, sergensio_sbreak_b, sergensio_dtr_b,
9       sergensio_rts_b - Blocking control for serial parameters on a sergensio
10

SYNOPSIS

12       #include <gensio/sergensio.h>
13
14       int sergensio_b_alloc(struct sergensio *sio, struct gensio_os_funcs *o,
15                           struct sergensio_b **new_sbio);
16
17       void sergensio_b_free(struct sergensio_b *sbio);
18
19       int sergensio_baud_b(struct sergensio_b *sbio, unsigned int *baud);
20
21       int sergensio_datasize_b(struct sergensio_b *sbio,
22                           unsigned int *datasize);
23
24       int sergensio_parity_b(struct sergensio_b *sbio, unsigned int *parity);
25
26       int sergensio_stopbits_b(struct sergensio_b *sbio,
27                           unsigned int *stopbits);
28
29       int sergensio_flowcontrol_b(struct sergensio_b *sbio,
30                           unsigned int *flowcontrol);
31
32       int sergensio_iflowcontrol_b(struct sergensio_b *sbio,
33                           unsigned int *iflowcontrol);
34
35       int sergensio_sbreak_b(struct sergensio_b *sbio, unsigned int *breakv);
36
37       int sergensio_dtr_b(struct sergensio_b *sbio, unsigned int *dtr);
38
39       int sergensio_rts_b(struct sergensio_b *sbio, unsigned int *rts);
40
41       int sergensio_cts_b(struct sergensio_b *sbio, unsigned int *cts);
42
43       int  sergensio_dcd_dsr_b(struct   sergensio_b   *sbio,   unsigned   int
44       *dcd_dsr);
45
46       int sergensio_ri_b(struct sergensio_b *sbio, unsigned int *ri);
47

DESCRIPTION

49       These  are  equivalent  to the non-blocking functions (without the _b),
50       but block waiting for the results.  Like all synchronous I/O, this  can
51       come with deadlock potential, so these should be used carefully.
52
53       To  use these, you must first allocate a sergensio blocking data struc‐
54       ture using sergensio_b_alloc for use in the other functions.  This  al‐
55       located  value  can only be used for one operation at a time.  When you
56       are done with it, you must free it with sergensio_b_free.
57
58       With these function, you pass a pointer to the value you want  to  set.
59       If  the  pointed  to value is zero, the value is not set, just fetched.
60       If the function returns without an error, the actual current  value  is
61       returned in the passed-in pointer's destination.
62
63       Note  that these do not require gensio_set_sync to work, and may be in‐
64       termixed with non-blocking operations.
65
66       See the various non-blocking functions for detail  on  the  values  and
67       what they mean.
68

RETURN VALUES

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

SEE ALSO

73       sergensio(5),  sergensio_baud(3), sergensio_datasize(3), sergensio_par‐
74       ity(3),   sergensio_stopbits(3),   sergensio_flowcontrol(3),    sergen‐
75       sio_iflowonctrol(3),   sergensio_sbreak(3),  sergensio_dtr(3),  sergen‐
76       sio_rts(3)
77

AUTHOR

79       Corey Minyard <minyard@acm.org>
80
81
82
83                                  20 Jul 2020           sergensio_b_alloc.3(3)
Impressum