Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libc] add doc for search.h #80492

Merged
merged 4 commits into from
Feb 2, 2024
Merged

Conversation

SchrodingerZhu
Copy link
Contributor

No description provided.

@llvmbot
Copy link
Collaborator

llvmbot commented Feb 2, 2024

@llvm/pr-subscribers-libc

Author: Schrodinger ZHU Yifan (SchrodingerZhu)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/80492.diff

2 Files Affected:

  • (modified) libc/docs/index.rst (+1)
  • (added) libc/docs/search.rst (+85)
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).

Copy link
Member

@nickdesaulniers nickdesaulniers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea, thanks for adding more docs!

libc/docs/search.rst Outdated Show resolved Hide resolved
libc/docs/search.rst Outdated Show resolved Hide resolved
Copy link
Member

@nickdesaulniers nickdesaulniers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

throwing an explicit -1 on this

libc/docs/search.rst Outdated Show resolved Hide resolved
Copy link
Member

@nickdesaulniers nickdesaulniers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, mid air collision. Thank you

@SchrodingerZhu SchrodingerZhu merged commit 0ce61e4 into llvm:main Feb 2, 2024
5 checks passed
@SchrodingerZhu SchrodingerZhu deleted the lib/doc/search branch February 2, 2024 23:55
agozillon pushed a commit to agozillon/llvm-project that referenced this pull request Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants