[libc-commits] [libc] [libc] add doc for search.h (PR #80492)

Schrodinger ZHU Yifan via libc-commits libc-commits at lists.llvm.org
Fri Feb 2 14:55:57 PST 2024


https://github.com/SchrodingerZhu updated https://github.com/llvm/llvm-project/pull/80492

>From d0768c4dde0e3a12316c3f23e2764f5fbadbc0d8 Mon Sep 17 00:00:00 2001
From: Schrodinger ZHU Yifan <yifanzhu at rochester.edu>
Date: Fri, 2 Feb 2024 15:48:45 -0500
Subject: [PATCH 1/2] [libc] add doc for search.h

---
 libc/docs/index.rst  |  1 +
 libc/docs/search.rst | 85 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 86 insertions(+)
 create mode 100644 libc/docs/search.rst

diff --git a/libc/docs/index.rst b/libc/docs/index.rst
index 2740e9152703b..0d72c1651457d 100644
--- a/libc/docs/index.rst
+++ b/libc/docs/index.rst
@@ -66,6 +66,7 @@ stages there is no ABI stability in any form.
    strings
    stdio
    stdbit
+   search
 
 .. toctree::
    :hidden:
diff --git a/libc/docs/search.rst b/libc/docs/search.rst
new file mode 100644
index 0000000000000..5fbb4c5673475
--- /dev/null
+++ b/libc/docs/search.rst
@@ -0,0 +1,85 @@
+=============
+Search Tables
+=============
+
+.. include:: check.rst
+
+---------------
+Source location
+---------------
+
+-   The main source for bitwise utility functions is located at:
+    ``libc/src/search``.
+
+-   Hashtable implementation is located at:
+    ``libc/src/__support/HashTable``.
+
+-   The tests are located at:
+    ``libc/test/src/search/``.
+
+---------------------
+Implementation Status
+---------------------
+
+POSIX Standard Types
+====================
+
+============================ =========
+Type Name                    Available
+============================ =========
+ACTION                       |check|
+ENTRY                        |check|
+VISIT                        
+============================ =========
+
+
+GNU Extension Types
+===================
+
+============================ ================= =========
+Type Name                    Associated Macro  Available
+============================ ================= ========= 
+struct qelem                 
+__compar_fn_t                __COMPAR_FN_T
+comparison_fn_t
+__action_fn_t                __ACTION_FN_T
+__free_fn_t
+============================ ================= =========
+
+
+POSIX Standard Functions
+========================
+
+============================ =========
+Function Name                Available
+============================ =========
+hcreate                      |check|
+hdestroy                     |check|
+hsearch                      |check|
+insque                       
+lfind                        
+lsearch                      
+remque
+tdelete
+tfind
+tsearch
+twalk
+============================ =========
+
+
+GNU Extension Functions
+=======================
+
+=========================  =========
+Function Name              Available
+=========================  =========
+hsearch_r                  |check|
+hcreate_r                  |check|
+hdestroy_r                 |check|
+twalk_r
+=========================  =========
+
+
+Standards
+=========
+search.h is specified in POSIX.1-200x (Portable Operating System Interface, Volume1: Base Specifications).

>From 1bd77ce0aefb19771dfc822331a8fce59c0fa5d1 Mon Sep 17 00:00:00 2001
From: Schrodinger ZHU Yifan <yifanzhu at rochester.edu>
Date: Fri, 2 Feb 2024 17:55:49 -0500
Subject: [PATCH 2/2] add `tdestroy`

---
 libc/docs/search.rst | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libc/docs/search.rst b/libc/docs/search.rst
index 5fbb4c5673475..6c1207835dadc 100644
--- a/libc/docs/search.rst
+++ b/libc/docs/search.rst
@@ -76,6 +76,7 @@ Function Name              Available
 hsearch_r                  |check|
 hcreate_r                  |check|
 hdestroy_r                 |check|
+tdestroy
 twalk_r
 =========================  =========
 



More information about the libc-commits mailing list