Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CodeHawk/CHB/bchlib/bCHBCTypeXml.ml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ let ch_named_struct_types = [
"ch__pthread_cond_t";
"ch__pthread_mutex_t";
"ch__pthread_mutexattr_t";
"ch__pthread_rwlock_t";
"ch__pthread_rwlockattr_t";
"ch__pthread_start_routine";
"ch__pthread_t";
"ch__rlimit"; (* used in getrlimit *)
Expand Down
43 changes: 43 additions & 0 deletions CodeHawk/CHB/bchsummaries/so_functions/localtime_r.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<codehawk-binary-analyzer>
<reference href="http://pubs.opengroup.org/onlinepubs/000095399/"/>
<header date="2026-10-19 22:08:40"/>
<libfun lib="so_functions" name="localtime_r">
<documentation>
<desc>convert a time value to a broken-down local time</desc>
<apidoc>
<pt>
<ll>struct tm *localtime_r(</ll>
<ld>const time_t *restrict timer</ld>
<ld>struct tm *restrict result</ld>
<ll>)</ll>
</pt>
<par name="timer">time in seconds pointed to</par>
<par name="result">result structure</par>
<return>
<rc cond="success">pointer to broken down time structure</rc>
<rc cond="failure">NULL</rc>
</return>
</apidoc>
</documentation>
<api adj="0" cc="cdecl" name="localtime_r">
<par loc="stack" name="timer" nr="1">
<type><ptr>time_t</ptr></type>
<pre><deref-read/></pre>
</par>
<par loc="stack" name="result" nr="2">
<type><ptr><ptr>ch__tm</ptr></ptr></type>
</par>
<returntype><ptr>ch__tm</ptr></returntype>
</api>
<semantics>
<io-actions/>
<preconditions/>
<postconditions>
<notnull-null/>
</postconditions>
<sideeffects/>
</semantics>
</libfun>
<copyright-notice>Copyright 2012-2026, Henny Sipma, Palo Alto, CA 94304</copyright-notice>
</codehawk-binary-analyzer>
43 changes: 43 additions & 0 deletions CodeHawk/CHB/bchsummaries/so_functions/mkfifo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<codehawk-binary-analyzer>
<reference href="http://pubs.opengroup.org/onlinepubs/000095399/"/>
<header date="2026-10-19 22:24:06"/>
<libfun lib="so_functions" name="mkfifo">
<documentation>
<desc>make a FIFO special file</desc>
<apidoc>
<pt>
<ll>int mkfifo(</ll>
<ld>const char *path</ld>
<ld>mode_t mode</ld>
<ll>)</ll>
</pt>
<par name="path">name of file to be created</par>
<par name="mode">file permissions</par>
<return>
<rc cond="success">zero</rc>
<rc cond="failure">-1</rc>
</return>
</apidoc>
</documentation>
<api adj="0" cc="cdecl" name="mkfifo">
<par loc="stack" name="path" nr="1">
<type><ptr>char</ptr></type>
<pre><deref-read-nt/></pre>
</par>
<par loc="stack" name="mode" nr="2">
<type>mode_t</type>
</par>
<returntype>int</returntype>
</api>
<semantics>
<io-actions/>
<preconditions/>
<postconditions>
<zero-nonzero/>
</postconditions>
<sideeffects/>
</semantics>
</libfun>
<copyright-notice>Copyright 2012-2026, Henny Sipma, Palo Alto, CA 94304</copyright-notice>
</codehawk-binary-analyzer>
34 changes: 34 additions & 0 deletions CodeHawk/CHB/bchsummaries/so_functions/pthread_attr_destroy.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<codehawk-binary-analyzer>
<reference href="http://pubs.opengroup.org/onlinepubs/000095399/"/>
<header date="2026-10-19 21:22:47"/>
<libfun lib="so_functions" name="pthread_attr_destroy">
<documentation>
<desc>destroy the thread attributes object</desc>
<apidoc>
<pt>int pthread_attr_destroy (pthread_attr_t *attr)</pt>
<par name="attr">thread attributes object to be destroyed</par>
<return>
<rc cond="success">zero</rc>
<rc cond="failure">error-number</rc>
</return>
</apidoc>
</documentation>
<api adj="0" cc="cdecl" name="pthread_attr_destroy">
<par loc="stack" name="attr" nr="1">
<type><ptr>ch__pthread_attr_t</ptr></type>
<pre><deref-read/></pre>
</par>
<returntype>int</returntype>
</api>
<semantics>
<io-actions/>
<preconditions/>
<postconditions>
<zero-nonzero/>
</postconditions>
<sideeffects/>
</semantics>
</libfun>
<copyright-notice>Copyright 2012-2026, Henny Sipma, Palo Alto, CA 94304</copyright-notice>
</codehawk-binary-analyzer>
34 changes: 34 additions & 0 deletions CodeHawk/CHB/bchsummaries/so_functions/pthread_attr_init.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<codehawk-binary-analyzer>
<reference href="http://pubs.opengroup.org/onlinepubs/000095399/"/>
<header date="2026-10-19 21:19:03"/>
<libfun lib="so_functions" name="pthread_attr_init">
<documentation>
<desc>initialize the thread attributes object</desc>
<apidoc>
<pt>int pthread_attr_init (pthread_attr_t *attr)</pt>
<par name="attr">thread attributes object to be initialized</par>
<return>
<rc cond="success">zero</rc>
<rc cond="failure">error number</rc>
</return>
</apidoc>
</documentation>
<api adj="0" cc="cdecl" name="pthread_attr_init">
<par loc="stack" name="attr" nr="1">
<type><ptr>ch__pthread_attr_t</ptr></type>
<pre><deref-read/></pre>
</par>
<returntype>int</returntype>
</api>
<semantics>
<io-actions/>
<preconditions/>
<postconditions>
<zero-nonzero/>
</postconditions>
<sideeffects/>
</semantics>
</libfun>
<copyright-notice>Copyright 2012-2026, Henny Sipma, Palo Alto, CA 94304</copyright-notice>
</codehawk-binary-analyzer>
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<codehawk-binary-analyzer>
<reference href="http://pubs.opengroup.org/onlinepubs/000095399/"/>
<header date="2026-10-19 21:26:46"/>
<libfun lib="so_functions" name="pthread_attr_setstacksize">
<documentation>
<desc>set the stacksize attribute</desc>
<apidoc>
<pt>
<ll>int pthread_attr_setstacksize(</ll>
<ld>pthread_attr_t *attr</ld>
<ld>size_t stacksize</ld>
<ll>)</ll>
</pt>
<par name="attr">attributes object</par>
<par name="stacksize">minimum stacksize</par>
<return>
<rc cond="success">zero</rc>
<rc cond="failure">error number</rc>
</return>
</apidoc>
</documentation>
<api adj="0" cc="cdecl" name="pthread_attr_setstacksize">
<par loc="stack" name="attr" nr="1">
<type><ptr>ch__pthread_attr_t</ptr></type>
<pre><deref-read/></pre>
</par>
<par loc="stack" name="stacksize" nr="2">
<type>size_t</type>
</par>
<returntype>int</returntype>
</api>
<semantics>
<io-actions/>
<preconditions/>
<postconditions>
<zero-nonzero/>
</postconditions>
<sideeffects/>
</semantics>
</libfun>
<copyright-notice>Copyright 2012-2026, Henny Sipma, Palo Alto, CA 94304</copyright-notice>
</codehawk-binary-analyzer>
33 changes: 33 additions & 0 deletions CodeHawk/CHB/bchsummaries/so_functions/pthread_cancel.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<codehawk-binary-analyzer>
<reference href="http://pubs.opengroup.org/onlinepubs/000095399/"/>
<header date="2026-10-19 21:35:55"/>
<libfun lib="so_functions" name="pthread_cancel">
<documentation>
<desc>cancel execution of a thread</desc>
<apidoc>
<pt>pthread_cancel (pthread_t thread)</pt>
<par name="thread">target thread to be canceled</par>
<return>
<rc cond="success"> zero</rc>
<rc cond="failure">error number</rc>
</return>
</apidoc>
</documentation>
<api adj="0" cc="cdecl" name="pthread_cancel">
<par loc="stack" name="thread" nr="1">
<type>ch__pthread_t</type>
</par>
<returntype>int</returntype>
</api>
<semantics>
<io-actions/>
<preconditions/>
<postconditions>
<zero-nonzero/>
</postconditions>
<sideeffects/>
</semantics>
</libfun>
<copyright-notice>Copyright 2012-2026, Henny Sipma, Palo Alto, CA 94304</copyright-notice>
</codehawk-binary-analyzer>
33 changes: 33 additions & 0 deletions CodeHawk/CHB/bchsummaries/so_functions/pthread_detach.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<codehawk-binary-analyzer>
<reference href="http://pubs.opengroup.org/onlinepubs/000095399/"/>
<header date="2026-10-19 21:44:57"/>
<libfun lib="so_functions" name="pthread_detach">
<documentation>
<desc>detach a thread</desc>
<apidoc>
<pt>int pthread_detach (pthread_t thread)</pt>
<par name="thread">thread to be detached</par>
<return>
<rc cond="success"> zero</rc>
<rc cond="failure">error number</rc>
</return>
</apidoc>
</documentation>
<api adj="0" cc="cdecl" name="pthread_detach">
<par loc="stack" name="thread" nr="1">
<type>ch__pthread_t</type>
</par>
<returntype>int</returntype>
</api>
<semantics>
<io-actions/>
<preconditions/>
<postconditions>
<zero-nonzero/>
</postconditions>
<sideeffects/>
</semantics>
</libfun>
<copyright-notice>Copyright 2012-2026, Henny Sipma, Palo Alto, CA 94304</copyright-notice>
</codehawk-binary-analyzer>
43 changes: 43 additions & 0 deletions CodeHawk/CHB/bchsummaries/so_functions/pthread_join.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<codehawk-binary-analyzer>
<reference href="http://pubs.opengroup.org/onlinepubs/000095399/"/>
<header date="2026-10-19 21:39:07"/>
<libfun lib="so_functions" name="pthread_join">
<documentation>
<desc>wait for thread termination</desc>
<apidoc>
<pt>
<ll>int pthread_join(</ll>
<ld>pthread_t thread</ld>
<ld>void **value_ptr</ld>
<ll>)</ll>
</pt>
<par name="thread">target thread to wait for</par>
<par name="value_ptr">location to hold the exit value</par>
<return>
<rc cond="success">zero</rc>
<rc cond="failure">non-zero</rc>
</return>
</apidoc>
</documentation>
<api adj="0" cc="cdecl" name="pthread_join">
<par loc="stack" name="thread" nr="1">
<type>ch__pthread_t</type>
</par>
<par loc="stack" name="value_ptr" nr="2">
<type><ptr><ptr>void</ptr></ptr></type>
<pre><deref-read/></pre>
</par>
<returntype>int</returntype>
</api>
<semantics>
<io-actions/>
<preconditions/>
<postconditions>
<zero-nonzero/>
</postconditions>
<sideeffects/>
</semantics>
</libfun>
<copyright-notice>Copyright 2012-2026, Henny Sipma, Palo Alto, CA 94304</copyright-notice>
</codehawk-binary-analyzer>
34 changes: 34 additions & 0 deletions CodeHawk/CHB/bchsummaries/so_functions/pthread_rwlock_destroy.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<codehawk-binary-analyzer>
<reference href="http://pubs.opengroup.org/onlinepubs/000095399/"/>
<header date="2026-10-19 21:13:52"/>
<libfun lib="so_functions" name="pthread_rwlock_destroy">
<documentation>
<desc>destroy a read-write lock object</desc>
<apidoc>
<pt>int pthread_rwlock_destroy (pthread_rwlock_t *rwlock)</pt>
<par name="rwlock">read-write lock</par>
<return>
<rc cond="success">zero</rc>
<rc cond="failure">non-zero</rc>
</return>
</apidoc>
</documentation>
<api adj="0" cc="cdecl" name="pthread_rwlock_destroy">
<par loc="stack" name="rwlock" nr="1">
<type><ptr>ch__pthread_rwlock_t</ptr></type>
<pre><deref-read/></pre>
</par>
<returntype>int</returntype>
</api>
<semantics>
<io-actions/>
<preconditions/>
<postconditions>
<zero-nonzero/>
</postconditions>
<sideeffects/>
</semantics>
</libfun>
<copyright-notice>Copyright 2012-2026, Henny Sipma, Palo Alto, CA 94304</copyright-notice>
</codehawk-binary-analyzer>
Loading
Loading