Skip to content

Commit

Permalink
Update kfifo functions
Browse files Browse the repository at this point in the history
  • Loading branch information
shengwen-tw committed Nov 4, 2023
1 parent 5c4d440 commit f14d9be
Showing 1 changed file with 47 additions and 43 deletions.
90 changes: 47 additions & 43 deletions md_docs_6_api_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,6 @@
<div class="textblock"><h1><a class="anchor" id="autotoc_md7"></a>
User-space API</h1>
<h2><a class="anchor" id="autotoc_md8"></a>
Task:</h2>
<ul>
<li><a class="el" href="kernel_2task_8h.html#a3cb286c107d30bad2c5040b5cfc22eb1" title="Register a user task to be launch at the bootup stage.">HOOK_USER_TASK()</a></li>
<li><a class="el" href="tenok_2task_8h.html#abdd89d67d6038f5716d49bde2eed927e" title="Create new task.">task_create()</a></li>
<li><a class="el" href="unistd_8h.html#a939cb25a305fe68aad9b365077f1a8c7" title="return the ID of the calling task">getpid()</a></li>
<li><a class="el" href="stdlib_8h.html#a55e99c539cf7723ec15e856b7e0a8cee" title="To cause task termination.">exit()</a></li>
</ul>
<h2><a class="anchor" id="autotoc_md9"></a>
Scheduler:</h2>
<ul>
<li><a class="el" href="unistd_8h.html#a69c97039c9ec10a30e5edbdf365e3bbd" title="To cause the calling thread to sleep either until the number of real-time seconds specified in second...">sleep()</a></li>
Expand All @@ -87,6 +79,14 @@ <h2><a class="anchor" id="autotoc_md9"></a>
<li><a class="el" href="sched_8h.html#af1f370fc36ea6b22ed42b5ee3cf82a81" title="Return the minimum priority of the thread can be set.">sched_get_priority_min()</a></li>
<li><a class="el" href="sched_8h.html#a761d3ef9e8d86918e92b2b5c0d3e60e0" title="Write the round-robin time quantum of the scheduler into the timespec structure pointed to by tp.">sched_rr_get_interval()</a></li>
</ul>
<h2><a class="anchor" id="autotoc_md9"></a>
Task:</h2>
<ul>
<li><a class="el" href="kernel_2task_8h.html#a3cb286c107d30bad2c5040b5cfc22eb1" title="Register a user task to be launch at the bootup stage.">HOOK_USER_TASK()</a></li>
<li><a class="el" href="tenok_2task_8h.html#abdd89d67d6038f5716d49bde2eed927e" title="Create new task.">task_create()</a></li>
<li><a class="el" href="unistd_8h.html#a939cb25a305fe68aad9b365077f1a8c7" title="return the ID of the calling task">getpid()</a></li>
<li><a class="el" href="stdlib_8h.html#a55e99c539cf7723ec15e856b7e0a8cee" title="To cause task termination.">exit()</a></li>
</ul>
<h2><a class="anchor" id="autotoc_md10"></a>
Thread:</h2>
<ul>
Expand Down Expand Up @@ -116,7 +116,7 @@ <h2><a class="anchor" id="autotoc_md10"></a>
<li><a class="el" href="pthread_8h.html#a4c4f5f3b4f8f45d9d897847d53b11aaa" title="Return the thread ID of the calling thread.">pthread_self()</a></li>
</ul>
<h2><a class="anchor" id="autotoc_md11"></a>
Mutex and Condition Variable:</h2>
Mutex and Conditional Variable:</h2>
<ul>
<li><a class="el" href="pthread_8h.html#a7454d249ed94ad5d5e57ba1529d7a7f2" title="Initialize a mutex with specified attributes.">pthread_mutex_init()</a></li>
<li><a class="el" href="pthread_8h.html#a3cf620ff3a40af11d79cf28901dc55e2" title="Destroy the given mutex object.">pthread_mutex_destroy()</a></li>
Expand Down Expand Up @@ -198,9 +198,9 @@ <h2><a class="anchor" id="autotoc_md16"></a>
Timer and Clock:</h2>
<ul>
<li><a class="el" href="tenok_2time_8h.html#a6b9bbabed8d04297407e2ac5c3c2f45c" title="Create a new per-thread interval timer.">timer_create()</a></li>
<li><a class="el" href="tenok_2time_8h.html#ad114bb350d7d5d12cff3fd19bf533303" title="Delete the timer whose ID is given in timerid.">timer_delete()</a></li>
<li><a class="el" href="tenok_2time_8h.html#aaa37b1ad77721f776718e61e81777a9d" title="Return the time until next expiration, and the interval, for the timer specified by timerid.">timer_gettime()</a></li>
<li><a class="el" href="tenok_2time_8h.html#a07458ae54d92e247bd7157bb716159b2" title="Arm or disarm the timer identified by timerid.">timer_settime()</a></li>
<li><a class="el" href="tenok_2time_8h.html#aaa37b1ad77721f776718e61e81777a9d" title="Return the time until next expiration, and the interval, for the timer specified by timerid.">timer_gettime()</a></li>
<li><a class="el" href="tenok_2time_8h.html#ad114bb350d7d5d12cff3fd19bf533303" title="Delete the timer whose ID is given in timerid.">timer_delete()</a></li>
<li><a class="el" href="tenok_2time_8h.html#a49d0147c5c0a6a7327541bfa7c694fe9" title="Get the resolution (precision) of the specified clock clockid.">clock_getres()</a></li>
<li><a class="el" href="tenok_2time_8h.html#ac686a89baec3a10f53c1565f4d451fce" title="Retrieve the time of the specified clock clockid.">clock_gettime()</a></li>
<li><a class="el" href="tenok_2time_8h.html#a0e38ba6dd41a9999acda0d556620da44" title="Set the time of the specified clock clockid.">clock_settime()</a></li>
Expand All @@ -218,57 +218,73 @@ <h2><a class="anchor" id="autotoc_md17"></a>
<h1><a class="anchor" id="autotoc_md19"></a>
Kernel-space API</h1>
<h2><a class="anchor" id="autotoc_md20"></a>
Logging:</h2>
<ul>
<li><a class="el" href="printk_8h.html#a25b30e8bbadd54650c56895999dd808f" title="Print kernel message. The function should only be called inside the kernel space.">printk()</a></li>
</ul>
<h2><a class="anchor" id="autotoc_md21"></a>
Interrupt:</h2>
<ul>
<li><a class="el" href="interrupt_8h.html#ae6fd493c423e6f2cd1ef55ecbecf4f32" title="Disable all interrupts.">preempt_disable()</a></li>
<li><a class="el" href="interrupt_8h.html#a63f517f5c268f48aad30e493a14a2aad" title="Ensable all interrupts. The function is only valid if it is called by kernel space code or in kernel ...">preempt_enable()</a></li>
<li><a class="el" href="interrupt_8h.html#a484455632e61fca257542ffc276434aa" title="Register the interrupt handler function to a specified IRQ.">request_irq()</a></li>
</ul>
<h2><a class="anchor" id="autotoc_md22"></a>
Mutex:</h2>
<ul>
<li><a class="el" href="mutex_8h.html#a3029ce425032b167692de6c265676a0b" title="Initialize the given mutex. The function should only be called inside the kernel space.">mutex_init()</a></li>
<li><a class="el" href="mutex_8h.html#af6184e0422d24714e3485d139f776ef8" title="Returns true if the mutex is locker, otherwise returns false. The function should only be called insi...">mutex_is_locked()</a></li>
<li><a class="el" href="mutex_8h.html#a78a574e9c2b09bb00d53bbfe262c892c" title="Lock the given mutex. The function should only be called inside the kernel space.">mutex_lock()</a></li>
<li><a class="el" href="mutex_8h.html#aa46844346d7946f83a90ca5fbb22f37c" title="Unlock the given mutex. The function should only be called inside the kernel space.">mutex_unlock()</a></li>
</ul>
<h2><a class="anchor" id="autotoc_md21"></a>
<h2><a class="anchor" id="autotoc_md23"></a>
Semaphore:</h2>
<ul>
<li><a class="el" href="kernel_2semaphore_8h.html#a4cef46903ef1eff72f75e10889a46e0e" title="Initialize the semaphore at the address pointed to by sem. The function should only be called inside ...">sema_init()</a></li>
<li><a class="el" href="kernel_2semaphore_8h.html#a10413f63f926891914b59ec498f02b9c" title="Increments (unlocks) the semaphore pointed to by sem. The function should only be called inside the k...">up()</a></li>
<li><a class="el" href="kernel_2semaphore_8h.html#a2da384dbf85c2376e660e7a3579675b7" title="Decrements (locks) the semaphore pointed to by sem. The function should only be called inside the ker...">down()</a></li>
<li><a class="el" href="kernel_2semaphore_8h.html#ac64b9df30fded70ff19c6192f1ee13d1" title="The same as down(), except that if the decrement cannot be immediately performed, then call returns a...">down_trylock()</a></li>
</ul>
<h2><a class="anchor" id="autotoc_md22"></a>
<h2><a class="anchor" id="autotoc_md24"></a>
Tasklet:</h2>
<ul>
<li><a class="el" href="softirq_8h.html#a16d0a8e8577f5baa2a847be0c46cf91c" title="Initialize the given tasklet.">tasklet_init()</a></li>
<li><a class="el" href="softirq_8h.html#aa6e4edec81b5c0ac7bc437d1ca4ba854" title="Schedule the given tasklet to execute by softirqd.">tasklet_schedule()</a></li>
</ul>
<h2><a class="anchor" id="autotoc_md23"></a>
Waitqueue:</h2>
<h2><a class="anchor" id="autotoc_md25"></a>
Wait Queue:</h2>
<ul>
<li><a class="el" href="wait_8h.html#a603d0b39b1ddd74cfc24bb4f184add80" title="Suspend the current thread and place it into a wait list with a new state.">prepare_to_wait()</a></li>
<li><a class="el" href="wait_8h.html#a36e12d32cde9241efb587f522cd0a07e" title="Move the thread from a waiting list into the ready list and set it to ready state.">finish_wait()</a></li>
<li><a class="el" href="wait_8h.html#adaf1c7df7b40eccebaa180cb9b5e3df5" title="Wake up the highest priority thread from the wait_list.">wake_up()</a></li>
<li><a class="el" href="wait_8h.html#ab1bc46e7c480408ccfd0d806a3620d6b" title="Wake up all threads from the wait_list.">wake_up_all()</a></li>
</ul>
<h2><a class="anchor" id="autotoc_md24"></a>
<h2><a class="anchor" id="autotoc_md26"></a>
kfifo:</h2>
<ul>
<li><a class="el" href="kfifo_8h.html#abb892d3303e62e441691c9f617b452f9" title="Initialize a fifo using a preallocated buffer.">kfifo_init()</a></li>
<li><a class="el" href="kfifo_8h.html#a847ae55dce0ae1808c3ac3eb385aee35" title="Dynamically allocate a new fifo buffer.">kfifo_alloc()</a></li>
<li><a class="el" href="kfifo_8h.html#add133464513667d74df1ea705da7b658" title="Return the number of unused elements in the fifo.">kfifo_avail()</a></li>
<li><a class="el" href="kfifo_8h.html#a389d8f3d67f49d372aa4a80bc09dd19d" title="Return the size of the element managed by the fifo.">kfifo_esize()</a></li>
<li><a class="el" href="kfifo_8h.html#aec8a29900ae2fd632d34e980c7700401" title="Free the fifo.">kfifo_free()</a></li>
<li><a class="el" href="kfifo_8h.html#af997a9791fa2d33132751fe728ddb480" title="Get data from the fifo.">kfifo_get()</a></li>
<li><a class="el" href="kfifo_8h.html#a4c64a5f89bcedd07fa8a30cb39d771c2" title="Put data into the fifo.">kfifo_in()</a></li>
<li><a class="el" href="kfifo_8h.html#abb892d3303e62e441691c9f617b452f9" title="Initialize a fifo using a preallocated buffer.">kfifo_init()</a></li>
<li><a class="el" href="kfifo_8h.html#a02074d9c3600a094129fd5f634bcc5a7" title="Return true if the fifo is empty.">kfifo_is_empty()</a></li>
<li><a class="el" href="kfifo_8h.html#aeee96875272817efd55eb3d34a23131e" title="Return true if the fifo is full.">kfifo_is_full()</a></li>
<li><a class="el" href="kfifo_8h.html#a20a29bd752e35f9f51a92c6909f6f961" title="Return the number of used elements in the fifo.">kfifo_len()</a></li>
<li><a class="el" href="kfifo_8h.html#a8ea9ee2d802445340fe156ecdb2879b6" title="Get data from the fifo.">kfifo_out()</a></li>
<li><a class="el" href="kfifo_8h.html#a1aaaa3414c7f6bbb878a0237aea29784" title="Get some data from the fifo without removing.">kfifo_out_peek()</a></li>
<li><a class="el" href="kfifo_8h.html#a0098ffaf07b19cdffaa59796a4ba7288" title="Read data pointer of the next element to write.">kfifo_dma_in_prepare()</a></li>
<li><a class="el" href="kfifo_8h.html#af8d91fcec7140f0ea7522249689cc5fb" title="Complete data writing of the fifo with dma.">kfifo_dma_in_finish()</a></li>
<li><a class="el" href="kfifo_8h.html#ae95616aacf49378fd13eb035438819a2" title="Read data pointer of the next element to read.">kfifo_dma_out_prepare()</a></li>
<li><a class="el" href="kfifo_8h.html#a58d356150a95bd7414ba54d6d0740953" title="Complete data reading of the fifo with dma.">kfifo_dma_out_finish()</a></li>
<li><a class="el" href="kfifo_8h.html#a77ba4009d9fd8f73594694e9f30f1c37" title="Put data into the fifo.">kfifo_put()</a></li>
<li><a class="el" href="kfifo_8h.html#af997a9791fa2d33132751fe728ddb480" title="Get data from the fifo.">kfifo_get()</a></li>
<li><a class="el" href="kfifo_8h.html#a2deee3e20d75d0d56c136b5751a36e5e" title="Get data from the fifo without removing.">kfifo_peek()</a></li>
<li><a class="el" href="kfifo_8h.html#abaaf99300403967791fd0f71a13f4db1" title="Return the record length of the next element to read.">kfifo_peek_len()</a></li>
<li><a class="el" href="kfifo_8h.html#a77ba4009d9fd8f73594694e9f30f1c37" title="Put data into the fifo.">kfifo_put()</a></li>
<li><a class="el" href="kfifo_8h.html#a26426e55347017cec181e3d082c48bbc" title="Return the number of elements can be stored in the fifo.">kfifo_size()</a></li>
<li><a class="el" href="kfifo_8h.html#a5aa333e91b9442acfb2307b8893bf43b" title="Skip data from the fifo.">kfifo_skip()</a></li>
<li><a class="el" href="kfifo_8h.html#add133464513667d74df1ea705da7b658" title="Return the number of unused elements in the fifo.">kfifo_avail()</a></li>
<li><a class="el" href="kfifo_8h.html#a20a29bd752e35f9f51a92c6909f6f961" title="Return the number of used elements in the fifo.">kfifo_len()</a></li>
<li><a class="el" href="kfifo_8h.html#a389d8f3d67f49d372aa4a80bc09dd19d" title="Return the size of the element managed by the fifo.">kfifo_esize()</a></li>
<li><a class="el" href="kfifo_8h.html#a26426e55347017cec181e3d082c48bbc" title="Return the number of elements can be stored in the fifo.">kfifo_size()</a></li>
<li><a class="el" href="kfifo_8h.html#a02074d9c3600a094129fd5f634bcc5a7" title="Return true if the fifo is empty.">kfifo_is_empty()</a></li>
<li><a class="el" href="kfifo_8h.html#aeee96875272817efd55eb3d34a23131e" title="Return true if the fifo is full.">kfifo_is_full()</a></li>
</ul>
<h2><a class="anchor" id="autotoc_md25"></a>
<h2><a class="anchor" id="autotoc_md27"></a>
List:</h2>
<ul>
<li><a class="el" href="list_8h.html#a42f0e72af970a790b60a740af8c9ecd0" title="Declare and initialize a new list head.">LIST_HEAD()</a></li>
Expand All @@ -281,15 +297,15 @@ <h2><a class="anchor" id="autotoc_md25"></a>
<li><a class="el" href="list_8h.html#ac2f0fecd0fceee7e5a9cb5550639e87a" title="Check if the list item is the last item in the list.">list_is_last()</a></li>
<li><a class="el" href="list_8h.html#a7d1de96ef90e72bd5ba765e67cb83b74" title="Move list item from current list to another.">list_move()</a></li>
<li><a class="el" href="list_8h.html#a26c976b7f654e70df318c1843e5094de" title="Get the object entry.">list_entry()</a></li>
<li><a class="el" href="list_8h.html#a419ef9513bf508915b2ae9156e67dd6b" title="Check if the list entry is the list head.">list_entry_is_head()</a></li>
<li><a class="el" href="list_8h.html#a29b80cf9d55392a4949d2071b7db4d5c" title="Get the first object entry.">list_first_entry()</a></li>
<li><a class="el" href="list_8h.html#ad5a7bbc278609c0fee4536eeeaa1afab" title="Get the next object entry.">list_next_entry()</a></li>
<li><a class="el" href="list_8h.html#a9130468440cee8613eea994b4c737b6c" title="Get the previous object entry.">list_prev_entry()</a></li>
<li><a class="el" href="list_8h.html#a419ef9513bf508915b2ae9156e67dd6b" title="Check if the list entry is the list head.">list_entry_is_head()</a></li>
<li><a class="el" href="list_8h.html#ab8b24e6660ab3760c923e4b4db3fa502" title="Iterate the list item through the whole list.">list_for_each()</a></li>
<li><a class="el" href="list_8h.html#a9b782fefb5ab71ce9762182e45a615e1" title="Iterate the object entry through the whole list.">list_for_each_entry()</a></li>
<li><a class="el" href="list_8h.html#a423032d60f7c4ac85d4919103669d5b1" title="Iterate the list item through the whole list safely.">list_for_each_safe()</a></li>
<li><a class="el" href="list_8h.html#ad5a7bbc278609c0fee4536eeeaa1afab" title="Get the next object entry.">list_next_entry()</a></li>
<li><a class="el" href="list_8h.html#a9130468440cee8613eea994b4c737b6c" title="Get the previous object entry.">list_prev_entry()</a></li>
</ul>
<h2><a class="anchor" id="autotoc_md26"></a>
<h2><a class="anchor" id="autotoc_md28"></a>
Memory Allocation:</h2>
<ul>
<li><a class="el" href="mm_8h.html#a5f52d7c56b7d67dc2f96b2e93dfdc7be" title="Allocate size bytes and returns a pointer to the allocated memory. The function can be only used in k...">kmalloc()</a></li>
Expand All @@ -300,19 +316,7 @@ <h2><a class="anchor" id="autotoc_md26"></a>
<li><a class="el" href="page_8h.html#a7723c0cec0d9d3afcf239120c64ce684" title="Free an allocated memory page.">free_pages()</a></li>
<li><a class="el" href="slab_8h.html#a880ac3a4b0bb8eaf886163a6d4baac05" title="Allocate a new slab memory. The function should only be called inside the kernel space.">kmem_cache_alloc()</a></li>
<li><a class="el" href="slab_8h.html#af6519d3ee9ef62810f2d0398a1839818" title="Create a new slab cache. The function should only be called inside the kernel space.">kmem_cache_create()</a></li>
<li><a class="el" href="slab_8h.html#a417f38563ea3fa2ebc4a98e152f062ba" title="Free the allocated slab memory. The function should only be called inside the kernel space.">kmem_cache_free()</a></li>
</ul>
<h2><a class="anchor" id="autotoc_md27"></a>
Interrupt:</h2>
<ul>
<li><a class="el" href="interrupt_8h.html#ae6fd493c423e6f2cd1ef55ecbecf4f32" title="Disable all interrupts.">preempt_disable()</a></li>
<li><a class="el" href="interrupt_8h.html#a63f517f5c268f48aad30e493a14a2aad" title="Ensable all interrupts. The function is only valid if it is called by kernel space code or in kernel ...">preempt_enable()</a></li>
<li><a class="el" href="interrupt_8h.html#a484455632e61fca257542ffc276434aa" title="Register the interrupt handler function to a specified IRQ.">request_irq()</a></li>
</ul>
<h2><a class="anchor" id="autotoc_md28"></a>
Logging:</h2>
<ul>
<li><a class="el" href="printk_8h.html#a25b30e8bbadd54650c56895999dd808f" title="Print kernel message. The function should only be called inside the kernel space.">printk()</a> </li>
<li><a class="el" href="slab_8h.html#a417f38563ea3fa2ebc4a98e152f062ba" title="Free the allocated slab memory. The function should only be called inside the kernel space.">kmem_cache_free()</a> </li>
</ul>
</div></div><!-- contents -->
</div><!-- PageDoc -->
Expand Down

0 comments on commit f14d9be

Please sign in to comment.