Skip to content

Commit 7c9385a

Browse files
committed
CHB:FSUM: add function summaries
1 parent d70e698 commit 7c9385a

File tree

9 files changed

+391
-0
lines changed

9 files changed

+391
-0
lines changed
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<codehawk-binary-analyzer>
3+
<reference href="http://pubs.opengroup.org/onlinepubs/000095399/"/>
4+
<header date="2024-09-30 13:13:00"/>
5+
<libfun lib="so-functions" name="bzero">
6+
<documentation>
7+
<desc>places len zero-valued bytes in the area pointed to by buffer</desc>
8+
<apidoc>
9+
<pt>
10+
<ll>void bzero(</ll>
11+
<ld>void *buffer</ld>
12+
<ld>size_t len</ld>
13+
<ll>)</ll>
14+
</pt>
15+
<par name="buffer">buffer to be zeroed out</par>
16+
<par name="len">length of the buffer</par>
17+
<return/>
18+
</apidoc>
19+
</documentation>
20+
<api adj="0" cc="cdecl" name="bzero">
21+
<par loc="stack" name="buffer" rep="hex" io="w" nr="1">
22+
<type><ptr>void</ptr></type>
23+
<roles>
24+
<role rt="ioc:memops" rn="dst-bytes:set"/>
25+
</roles>
26+
</par>
27+
<par loc="stack" name="len" desc="count" io="r" roles="none" nr="2">
28+
<type>size_t</type>
29+
<pre><non-negative/></pre>
30+
</par>
31+
<returntype>void</returntype>
32+
</api>
33+
<semantics>
34+
<io-actions>
35+
<io-action cat="memops" desc="sets memory"/>
36+
</io-actions>
37+
<preconditions>
38+
<pre>
39+
<math>
40+
<apply>
41+
<deref-write/>
42+
<type>byte</type>
43+
<ci>buffer</ci>
44+
<ci>len</ci>
45+
</apply>
46+
</math>
47+
</pre>
48+
</preconditions>
49+
<postconditions/>
50+
<sideeffects>
51+
<sideeffect>
52+
<math>
53+
<apply>
54+
<block-write/>
55+
<type>byte</type>
56+
<ci>buffer</ci>
57+
<ci>len</ci>
58+
</apply>
59+
</math>
60+
</sideeffect>
61+
</sideeffects>
62+
</semantics>
63+
</libfun>
64+
<copyright-notice>Copyright 2012-2024, Henny Sipma, Palo Alto, CA 94304</copyright-notice>
65+
</codehawk-binary-analyzer>
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<codehawk-binary-analyzer>
3+
<reference href="http://pubs.opengroup.org/onlinepubs/000095399/"/>
4+
<header date="2024-09-30 13:32:58"/>
5+
<libfun lib="so-functions" name="cfgetispeed">
6+
<documentation>
7+
<desc>get input baud rate</desc>
8+
<apidoc>
9+
<pt>speed_t cfgetispeed (const struct termios *termios_p)</pt>
10+
<par name="termios_p">pointer to termios struct </par>
11+
<return>
12+
<rc cond="success">baud rate</rc>
13+
<rc cond="failure">undefined</rc>
14+
</return>
15+
</apidoc>
16+
</documentation>
17+
<api adj="0" cc="cdecl" name="cfgetispeed">
18+
<par loc="stack" name="termios_p" nr="1">
19+
<type><ptr>ch_termios</ptr></type>
20+
<pre><deref-read/></pre>
21+
</par>
22+
<returntype>speed_t</returntype>
23+
</api>
24+
<semantics>
25+
<io-actions/>
26+
<preconditions/>
27+
<postconditions/>
28+
<sideeffects/>
29+
</semantics>
30+
</libfun>
31+
<copyright-notice>Copyright 2012-2024, Henny Sipma, Palo Alto, CA 94304</copyright-notice>
32+
</codehawk-binary-analyzer>
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<codehawk-binary-analyzer>
3+
<reference href="http://pubs.opengroup.org/onlinepubs/000095399/"/>
4+
<header date="2024-09-30 13:37:13"/>
5+
<libfun lib="so-functions" name="cfgetospeed">
6+
<documentation>
7+
<desc>get output baud rate</desc>
8+
<apidoc>
9+
<pt>speed_t cfgetospeed (const struct termios *termios_p)</pt>
10+
<par name="termios_p">pointer to termios struct</par>
11+
<return>
12+
<rc cond="success">output baud rate</rc>
13+
<rc cond="failure">undefined</rc>
14+
</return>
15+
</apidoc>
16+
</documentation>
17+
<api adj="0" cc="cdecl" name="cfgetospeed">
18+
<par loc="stack" name="termios_p" nr="1">
19+
<type><ptr>ch_termios</ptr></type>
20+
<pre><deref-read/></pre>
21+
</par>
22+
<returntype>speed_t</returntype>
23+
</api>
24+
<semantics>
25+
<io-actions/>
26+
<preconditions/>
27+
<postconditions/>
28+
<sideeffects/>
29+
</semantics>
30+
</libfun>
31+
<copyright-notice>Copyright 2012-2024, Henny Sipma, Palo Alto, CA 94304</copyright-notice>
32+
</codehawk-binary-analyzer>
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<codehawk-binary-analyzer>
3+
<reference href="http://pubs.opengroup.org/onlinepubs/000095399/"/>
4+
<header date="2024-09-30 13:40:42"/>
5+
<libfun lib="so-functions" name="cfsetispeed">
6+
<documentation>
7+
<desc>set input baud rate</desc>
8+
<apidoc>
9+
<pt>
10+
<ll>int cfsetispeed(</ll>
11+
<ld>struct termios *termios_p</ld>
12+
<ld>speed_t speed</ld>
13+
<ll>)</ll>
14+
</pt>
15+
<par name="termios_p">pointer to termios struct</par>
16+
<par name="speed">input baud rate</par>
17+
<return>
18+
<rc cond="success">0</rc>
19+
<rc cond="failure">-1</rc>
20+
</return>
21+
</apidoc>
22+
</documentation>
23+
<api adj="0" cc="cdecl" name="cfsetispeed">
24+
<par loc="stack" name="termios_p" nr="1">
25+
<type><ptr>ch_termios</ptr></type>
26+
</par>
27+
<par loc="stack" name="speed" nr="2">
28+
<type>speed_t</type>
29+
</par>
30+
<returntype>int</returntype>
31+
</api>
32+
<semantics>
33+
<io-actions/>
34+
<preconditions/>
35+
<postconditions/>
36+
<sideeffects/>
37+
</semantics>
38+
</libfun>
39+
<copyright-notice>Copyright 2012-2024, Henny Sipma, Palo Alto, CA 94304</copyright-notice>
40+
</codehawk-binary-analyzer>
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<codehawk-binary-analyzer>
3+
<reference href="http://pubs.opengroup.org/onlinepubs/000095399/"/>
4+
<header date="2024-09-30 13:43:24"/>
5+
<libfun lib="so-functions" name="cfsetospeed">
6+
<documentation>
7+
<desc>set output baud rate</desc>
8+
<apidoc>
9+
<pt>
10+
<ll>int cfsetospeed(</ll>
11+
<ld>struct termios *termios_p</ld>
12+
<ld>speed_t speed</ld>
13+
<ll>)</ll>
14+
</pt>
15+
<par name="termios_p">pointer to termios struct</par>
16+
<par name="speed">output baud rate</par>
17+
<return>
18+
<rc cond="success">0</rc>
19+
<rc cond="failure">-1</rc>
20+
</return>
21+
</apidoc>
22+
</documentation>
23+
<api adj="0" cc="cdecl" name="cfsetospeed">
24+
<par loc="stack" name="termios_p" nr="1">
25+
<type><ptr>ch_termios</ptr></type>
26+
</par>
27+
<par loc="stack" name="speed" nr="2">
28+
<type>speed_t</type>
29+
</par>
30+
<returntype>int</returntype>
31+
</api>
32+
<semantics>
33+
<io-actions/>
34+
<preconditions/>
35+
<postconditions/>
36+
<sideeffects/>
37+
</semantics>
38+
</libfun>
39+
<copyright-notice>Copyright 2012-2024, Henny Sipma, Palo Alto, CA 94304</copyright-notice>
40+
</codehawk-binary-analyzer>
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<codehawk-binary-analyzer>
3+
<reference href="http://pubs.opengroup.org/onlinepubs/000095399/"/>
4+
<header date="2024-09-28 18:41:28"/>
5+
<libfun lib="so-functions" name="msgrcv">
6+
<documentation>
7+
<desc>XSI message receive operation</desc>
8+
<apidoc>
9+
<pt>
10+
<ll>msgrcv(</ll>
11+
<ld>msgid</ld>
12+
<ld>msgp</ld>
13+
<ld>msgsz</ld>
14+
<ld>msgtyp</ld>
15+
<ld>msgflg</ld>
16+
<ll>)</ll>
17+
</pt>
18+
<par name="msgid">message queue id</par>
19+
<par name="msgp">buffer to place the message (mtype; mtext)</par>
20+
<par name="msgsz">size, in bytes, of mtext</par>
21+
<par name="msgtyp">type of message</par>
22+
<par name="msgflg">action to be taken</par>
23+
<return>
24+
<rc cond="success">
25+
number of bytes placed in mtext
26+
</rc>
27+
<rc cond="failure">-1</rc>
28+
</return>
29+
</apidoc>
30+
</documentation>
31+
<api adj="0" cc="cdecl" name="msgrcv">
32+
<par loc="stack" name="msgid" nr="1">
33+
<type>int</type>
34+
</par>
35+
<par loc="stack" name="msgp" nr="2">
36+
<type><ptr>void</ptr></type>
37+
</par>
38+
<par loc="stack" name="msgsz" nr="3">
39+
<type>size_t</type>
40+
</par>
41+
<par loc="stack" name="msgtyp" nr="4">
42+
<type>long</type>
43+
</par>
44+
<par loc="stack" name="msgflg" nr="5">
45+
<type>int</type>
46+
</par>
47+
<returntype>ssize_t</returntype>
48+
</api>
49+
<semantics>
50+
<io-actions/>
51+
<preconditions/>
52+
<postconditions/>
53+
<sideeffects/>
54+
</semantics>
55+
</libfun>
56+
<copyright-notice>Copyright 2012-2024, Henny Sipma, Palo Alto, CA 94304</copyright-notice>
57+
</codehawk-binary-analyzer>
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<codehawk-binary-analyzer>
3+
<reference href="http://pubs.opengroup.org/onlinepubs/000095399/"/>
4+
<header date="2024-09-30 15:45:53"/>
5+
<libfun lib="so-functions" name="tcflush">
6+
<documentation>
7+
<desc>flush non-transmitted output data, non-read input data, or both </desc>
8+
<apidoc>
9+
<pt>
10+
<ll>int tcflush(</ll>
11+
<ld>int fildes</ld>
12+
<ld>int queue_selector</ld>
13+
<ll>)</ll>
14+
</pt>
15+
<par name="fildes">open file descriptor associate with a terminal</par>
16+
<par name="queue_selector">action to take</par>
17+
<return>
18+
<rc cond="success">0</rc>
19+
<rc cond="failure">-1</rc>
20+
</return>
21+
</apidoc>
22+
</documentation>
23+
<api adj="0" cc="cdecl" name="tcflush">
24+
<par loc="stack" name="fildes" nr="1">
25+
<type>int</type>
26+
</par>
27+
<par loc="stack" name="queue_selector" nr="2">
28+
<type>int</type>
29+
</par>
30+
<returntype>int</returntype>
31+
</api>
32+
<semantics>
33+
<io-actions/>
34+
<preconditions/>
35+
<postconditions/>
36+
<sideeffects/>
37+
</semantics>
38+
</libfun>
39+
<copyright-notice>Copyright 2012-2024, Henny Sipma, Palo Alto, CA 94304</copyright-notice>
40+
</codehawk-binary-analyzer>
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<codehawk-binary-analyzer>
3+
<reference href="http://pubs.opengroup.org/onlinepubs/000095399/"/>
4+
<header date="2024-09-28 19:23:18"/>
5+
<libfun lib="so-functions" name="tcgetattr">
6+
<documentation>
7+
<desc>get the parameters associated with the terminal</desc>
8+
<apidoc>
9+
<pt>
10+
<ll>int tcgetattr(</ll>
11+
<ld>int fildes</ld>
12+
<ld>struct termios *termios_p</ld>
13+
<ll>)</ll>
14+
</pt>
15+
<par name="fildes">terminal referred to by fildes</par>
16+
<par name="termios_p">termios structure</par>
17+
<return>
18+
<rc cond="success">0</rc>
19+
<rc cond="failure">-1</rc>
20+
</return>
21+
</apidoc>
22+
</documentation>
23+
<api adj="0" cc="cdecl" name="tcgetattr">
24+
<par loc="stack" name="fildes" nr="1">
25+
<type>int</type>
26+
</par>
27+
<par loc="stack" name="termios_p" nr="2">
28+
<type><ptr>ch_termios</ptr></type>
29+
</par>
30+
<returntype>int</returntype>
31+
</api>
32+
<semantics>
33+
<io-actions/>
34+
<preconditions/>
35+
<postconditions/>
36+
<sideeffects/>
37+
</semantics>
38+
</libfun>
39+
<copyright-notice>Copyright 2012-2024, Henny Sipma, Palo Alto, CA 94304</copyright-notice>
40+
</codehawk-binary-analyzer>
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<codehawk-binary-analyzer>
3+
<reference href="http://pubs.opengroup.org/onlinepubs/000095399/"/>
4+
<header date="2024-09-28 19:26:15"/>
5+
<libfun lib="so-functions" name="tcsetattr">
6+
<documentation>
7+
<desc>set the parameters associated with the terminal</desc>
8+
<apidoc>
9+
<pt>
10+
<ll>int tcsetattr(</ll>
11+
<ld>int fildes</ld>
12+
<ld>int optional_actions</ld>
13+
<ld>const struct termios *termios_p</ld>
14+
<ll>)</ll>
15+
</pt>
16+
<par name="fildes">filedescriptor of terminal</par>
17+
<par name="optional_actions">optional actions</par>
18+
<par name="termios_p">termios structure to be set</par>
19+
<return>
20+
<rc cond="success">0</rc>
21+
<rc cond="failure">-1</rc>
22+
</return>
23+
</apidoc>
24+
</documentation>
25+
<api adj="0" cc="cdecl" name="tcsetattr">
26+
<par loc="stack" name="fildes" nr="1">
27+
<type>int</type>
28+
</par>
29+
<par loc="stack" name="optional_actions" nr="2">
30+
<type>int</type>
31+
</par>
32+
<par loc="stack" name="termios_p" nr="3">
33+
<type><ptr>ch_termios</ptr></type>
34+
</par>
35+
<returntype>int</returntype>
36+
</api>
37+
<semantics>
38+
<io-actions/>
39+
<preconditions/>
40+
<postconditions/>
41+
<sideeffects/>
42+
</semantics>
43+
</libfun>
44+
<copyright-notice>Copyright 2012-2024, Henny Sipma, Palo Alto, CA 94304</copyright-notice>
45+
</codehawk-binary-analyzer>

0 commit comments

Comments
 (0)