2020-07-26 20:39:04 +00:00
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
< html xmlns = "http://www.w3.org/1999/xhtml" >
< head >
< meta http-equiv = "Content-Type" content = "text/xhtml;charset=UTF-8" / >
< meta http-equiv = "X-UA-Compatible" content = "IE=9" / >
2021-04-12 20:54:38 +00:00
< meta name = "generator" content = "Doxygen 1.9.1" / >
2020-07-26 20:39:04 +00:00
< meta name = "viewport" content = "width=device-width, initial-scale=1" / >
2020-07-26 20:40:39 +00:00
< title > MyOS Libc: libc/tasking.h File Reference< / title >
2020-07-26 20:39:04 +00:00
< link href = "tabs.css" rel = "stylesheet" type = "text/css" / >
< script type = "text/javascript" src = "jquery.js" > < / script >
< script type = "text/javascript" src = "dynsections.js" > < / script >
< link href = "navtree.css" rel = "stylesheet" type = "text/css" / >
< script type = "text/javascript" src = "resize.js" > < / script >
< script type = "text/javascript" src = "navtreedata.js" > < / script >
< script type = "text/javascript" src = "navtree.js" > < / script >
< link href = "search/search.css" rel = "stylesheet" type = "text/css" / >
< script type = "text/javascript" src = "search/searchdata.js" > < / script >
< script type = "text/javascript" src = "search/search.js" > < / script >
< link href = "doxygen.css" rel = "stylesheet" type = "text/css" / >
< / head >
< body >
< div id = "top" > <!-- do not remove this div, it is closed by doxygen! -->
< div id = "titlearea" >
< table cellspacing = "0" cellpadding = "0" >
< tbody >
< tr style = "height: 56px;" >
< td id = "projectalign" style = "padding-left: 0.5em;" >
2020-07-26 20:40:39 +00:00
< div id = "projectname" > MyOS Libc
2020-07-26 20:39:04 +00:00
< / div >
< / td >
< / tr >
< / tbody >
< / table >
< / div >
<!-- end header part -->
2021-04-12 20:54:38 +00:00
<!-- Generated by Doxygen 1.9.1 -->
2020-07-26 20:39:04 +00:00
< script type = "text/javascript" >
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3& dn=gpl-2.0.txt GPL-v2 */
2021-04-12 20:54:38 +00:00
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
2020-07-26 20:39:04 +00:00
/* @license-end */
< / script >
< script type = "text/javascript" src = "menudata.js" > < / script >
< script type = "text/javascript" src = "menu.js" > < / script >
< script type = "text/javascript" >
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3& dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */< / script >
< div id = "main-nav" > < / div >
< / div > <!-- top -->
< div id = "side-nav" class = "ui-resizable side-nav-resizable" >
< div id = "nav-tree" >
< div id = "nav-tree-contents" >
< div id = "nav-sync" class = "sync" > < / div >
< / div >
< / div >
< div id = "splitbar" style = "-moz-user-select:none;"
class="ui-resizable-handle">
< / div >
< / div >
< script type = "text/javascript" >
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3& dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('tasking_8h.html',''); initResizable(); });
/* @license-end */
< / script >
< div id = "doc-content" >
<!-- window showing the filter options -->
< div id = "MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
< / div >
<!-- iframe showing the search results (closed by default) -->
< div id = "MSearchResultsWindow" >
< iframe src = "javascript:void(0)" frameborder = "0"
name="MSearchResults" id="MSearchResults">
< / iframe >
< / div >
< div class = "header" >
< div class = "summary" >
< a href = "#enum-members" > Enumerations< / a > |
< a href = "#func-members" > Functions< / a > < / div >
< div class = "headertitle" >
< div class = "title" > tasking.h File Reference< / div > < / div >
< / div > <!-- header -->
< div class = "contents" >
< div class = "textblock" > < code > #include < stdint.h> < / code > < br / >
< code > #include < sys/types.h> < / code > < br / >
< / div >
< p > < a href = "tasking_8h_source.html" > Go to the source code of this file.< / a > < / p >
< table class = "memberdecls" >
< tr class = "heading" > < td colspan = "2" > < h2 class = "groupheader" > < a name = "enum-members" > < / a >
Enumerations< / h2 > < / td > < / tr >
2021-04-12 20:54:38 +00:00
< tr class = "memitem:a4b1b32c1fc744438f665f0f1932dd207" > < td class = "memItemLeft" align = "right" valign = "top" > enum   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "tasking_8h.html#a4b1b32c1fc744438f665f0f1932dd207" > thread_state< / a > { < a class = "el" href = "tasking_8h.html#a4b1b32c1fc744438f665f0f1932dd207aa5639ff4eff3f959406116db9e020c44" > THREAD_RUNNING< / a >
, < a class = "el" href = "tasking_8h.html#a4b1b32c1fc744438f665f0f1932dd207adc6a307a71277ce8d642b5b916e05042" > THREAD_READY< / a >
, < a class = "el" href = "tasking_8h.html#a4b1b32c1fc744438f665f0f1932dd207ac9087b7375864c084808109e1e1af5bb" > THREAD_EXITED< / a >
, < a class = "el" href = "tasking_8h.html#a4b1b32c1fc744438f665f0f1932dd207a4aeda0a1e7e9882ce8b0310833fee46e" > THREAD_BLOCKED< / a >
2020-07-26 20:39:04 +00:00
}< / td > < / tr >
< tr class = "separator:a4b1b32c1fc744438f665f0f1932dd207" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< / table > < table class = "memberdecls" >
< tr class = "heading" > < td colspan = "2" > < h2 class = "groupheader" > < a name = "func-members" > < / a >
Functions< / h2 > < / td > < / tr >
< tr class = "memitem:a58c8b2ad0ea491a6642e5e1cbd358c89" > < td class = "memItemLeft" align = "right" valign = "top" > void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "tasking_8h.html#a58c8b2ad0ea491a6642e5e1cbd358c89" > yield< / a > ()< / td > < / tr >
< tr class = "separator:a58c8b2ad0ea491a6642e5e1cbd358c89" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
2020-07-30 15:10:45 +00:00
< tr class = "memitem:a9096cd6cda1c7bf1817f68e2801e866b" > < td class = "memItemLeft" align = "right" valign = "top" > void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "tasking_8h.html#a9096cd6cda1c7bf1817f68e2801e866b" > create_proc< / a > (void *start, void *address_space, void *param1, void *param2)< / td > < / tr >
< tr class = "separator:a9096cd6cda1c7bf1817f68e2801e866b" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
2020-07-29 13:11:44 +00:00
< tr class = "memitem:afd5e459c713d0c137166c9a55409b224" > < td class = "memItemLeft" align = "right" valign = "top" > void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "tasking_8h.html#afd5e459c713d0c137166c9a55409b224" > block_thread< / a > (< a class = "el" href = "tasking_8h.html#a4b1b32c1fc744438f665f0f1932dd207" > thread_state< / a > state)< / td > < / tr >
< tr class = "separator:afd5e459c713d0c137166c9a55409b224" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a008779a4224d51ad434bccded6e2a7fb" > < td class = "memItemLeft" align = "right" valign = "top" > void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "tasking_8h.html#a008779a4224d51ad434bccded6e2a7fb" > unblock_thread< / a > (pid_t pid, pid_t tid)< / td > < / tr >
< tr class = "separator:a008779a4224d51ad434bccded6e2a7fb" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
2020-08-02 19:37:55 +00:00
< tr class = "memitem:a99fbf41bdff7b11f1e440dc4dff67565" > < td class = "memItemLeft" align = "right" valign = "top" > char  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "tasking_8h.html#a99fbf41bdff7b11f1e440dc4dff67565" > check_proc_exists< / a > (pid_t pid)< / td > < / tr >
< tr class = "separator:a99fbf41bdff7b11f1e440dc4dff67565" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
2020-07-26 20:39:04 +00:00
< / table >
< h2 class = "groupheader" > Enumeration Type Documentation< / h2 >
< a id = "a4b1b32c1fc744438f665f0f1932dd207" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a4b1b32c1fc744438f665f0f1932dd207" > ◆ < / a > < / span > thread_state< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > enum < a class = "el" href = "tasking_8h.html#a4b1b32c1fc744438f665f0f1932dd207" > thread_state< / a > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Represents the state of a thread < / p >
< table class = "fieldtable" >
< tr > < th colspan = "2" > Enumerator< / th > < / tr > < tr > < td class = "fieldname" > < a id = "a4b1b32c1fc744438f665f0f1932dd207aa5639ff4eff3f959406116db9e020c44" > < / a > THREAD_RUNNING  < / td > < td class = "fielddoc" > < p > The state of a running thread. < / p >
< / td > < / tr >
< tr > < td class = "fieldname" > < a id = "a4b1b32c1fc744438f665f0f1932dd207adc6a307a71277ce8d642b5b916e05042" > < / a > THREAD_READY  < / td > < td class = "fielddoc" > < p > The state of a ready to run thread. < / p >
< / td > < / tr >
< tr > < td class = "fieldname" > < a id = "a4b1b32c1fc744438f665f0f1932dd207ac9087b7375864c084808109e1e1af5bb" > < / a > THREAD_EXITED  < / td > < td class = "fielddoc" > < p > The state of an exited thread. < / p >
< / td > < / tr >
< tr > < td class = "fieldname" > < a id = "a4b1b32c1fc744438f665f0f1932dd207a4aeda0a1e7e9882ce8b0310833fee46e" > < / a > THREAD_BLOCKED  < / td > < td class = "fielddoc" > < p > The state of a generically blocked thread. < / p >
< / td > < / tr >
< / table >
< / div >
< / div >
< h2 class = "groupheader" > Function Documentation< / h2 >
2020-07-29 13:11:44 +00:00
< a id = "afd5e459c713d0c137166c9a55409b224" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#afd5e459c713d0c137166c9a55409b224" > ◆ < / a > < / span > block_thread()< / h2 >
2020-07-26 20:39:04 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2020-07-29 13:11:44 +00:00
< td class = "memname" > void block_thread < / td >
2020-07-26 20:39:04 +00:00
< td > (< / td >
< td class = "paramtype" > < a class = "el" href = "tasking_8h.html#a4b1b32c1fc744438f665f0f1932dd207" > thread_state< / a >   < / td >
< td class = "paramname" > < em > state< / em > < / td > < td > )< / td >
< td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Block the current thread < / p > < dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
< tr > < td class = "paramname" > state< / td > < td > The state to block it with < / td > < / tr >
< / table >
< / dd >
< / dl >
2020-08-02 19:37:55 +00:00
< / div >
< / div >
< a id = "a99fbf41bdff7b11f1e440dc4dff67565" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a99fbf41bdff7b11f1e440dc4dff67565" > ◆ < / a > < / span > check_proc_exists()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > char check_proc_exists < / td >
< td > (< / td >
< td class = "paramtype" > pid_t  < / td >
< td class = "paramname" > < em > pid< / em > < / td > < td > )< / td >
< td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Check if a process exists < / p > < dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
< tr > < td class = "paramname" > pid< / td > < td > The param of the process to check < / td > < / tr >
< / table >
< / dd >
< / dl >
< dl class = "section return" > < dt > Returns< / dt > < dd > Whether the process exists < / dd > < / dl >
2020-07-26 20:39:04 +00:00
< / div >
< / div >
2020-07-30 15:10:45 +00:00
< a id = "a9096cd6cda1c7bf1817f68e2801e866b" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a9096cd6cda1c7bf1817f68e2801e866b" > ◆ < / a > < / span > create_proc()< / h2 >
2020-07-26 20:39:04 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2020-07-29 13:11:44 +00:00
< td class = "memname" > void create_proc < / td >
2020-07-26 20:39:04 +00:00
< td > (< / td >
< td class = "paramtype" > void *  < / td >
< td class = "paramname" > < em > start< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > void *  < / td >
2020-07-29 13:11:44 +00:00
< td class = "paramname" > < em > address_space< / em > , < / td >
2020-07-26 20:39:04 +00:00
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > void *  < / td >
< td class = "paramname" > < em > param1< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > void *  < / td >
< td class = "paramname" > < em > param2< / em >   < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
2020-07-30 15:10:45 +00:00
< p > Create a process < / p > < dl class = "params" > < dt > Parameters< / dt > < dd >
2020-07-26 20:39:04 +00:00
< table class = "params" >
< tr > < td class = "paramname" > start< / td > < td > The start function of the process < / td > < / tr >
2020-07-29 13:11:44 +00:00
< tr > < td class = "paramname" > address_space< / td > < td > The address space of the process < / td > < / tr >
2020-07-26 20:39:04 +00:00
< tr > < td class = "paramname" > param1< / td > < td > The first parameter of the process < / td > < / tr >
< tr > < td class = "paramname" > param2< / td > < td > The second parameter of the process < / td > < / tr >
< / table >
< / dd >
< / dl >
< / div >
< / div >
2020-07-29 13:11:44 +00:00
< a id = "a008779a4224d51ad434bccded6e2a7fb" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a008779a4224d51ad434bccded6e2a7fb" > ◆ < / a > < / span > unblock_thread()< / h2 >
2020-07-26 20:39:04 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2020-07-29 13:11:44 +00:00
< td class = "memname" > void unblock_thread < / td >
2020-07-26 20:39:04 +00:00
< td > (< / td >
< td class = "paramtype" > pid_t  < / td >
< td class = "paramname" > < em > pid< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > pid_t  < / td >
< td class = "paramname" > < em > tid< / em >   < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Unblock a thread in a process < / p > < dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
< tr > < td class = "paramname" > pid< / td > < td > The PID of the thread's process < / td > < / tr >
< tr > < td class = "paramname" > tid< / td > < td > The TID of the thread < / td > < / tr >
< / table >
< / dd >
< / dl >
< / div >
< / div >
< a id = "a58c8b2ad0ea491a6642e5e1cbd358c89" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a58c8b2ad0ea491a6642e5e1cbd358c89" > ◆ < / a > < / span > yield()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > void yield < / td >
< td > (< / td >
< td class = "paramname" > < / td > < td > )< / td >
< td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Yield the CPU to another process < / p >
< / div >
< / div >
< / div > <!-- contents -->
< / div > <!-- doc - content -->
<!-- start footer part -->
< div id = "nav-path" class = "navpath" > <!-- id is needed for treeview function! -->
< ul >
< li class = "navelem" > < a class = "el" href = "dir_fc1eb218ab426e5adb60367f98438da0.html" > libc< / a > < / li > < li class = "navelem" > < a class = "el" href = "tasking_8h.html" > tasking.h< / a > < / li >
2021-04-12 20:54:38 +00:00
< li class = "footer" > Generated by < a href = "https://www.doxygen.org/index.html" > < img class = "footer" src = "doxygen.svg" width = "104" height = "31" alt = "doxygen" / > < / a > 1.9.1 < / li >
2020-07-26 20:39:04 +00:00
< / ul >
< / div >
< / body >
< / html >