\doxysection{actor.\+hpp} \label{actor_8hpp_source}\index{C:/Users/yoneda/Documents/Pico\_Projects/tinykernel/tinykernel/include/tinykernel/actor.hpp@{C:/Users/yoneda/Documents/Pico\_Projects/tinykernel/tinykernel/include/tinykernel/actor.hpp}} \textbf{ [詳解]} \begin{DoxyCode}{0} \DoxyCodeLine{00001\ \textcolor{preprocessor}{\#pragma\ once}} \DoxyCodeLine{00002\ } \DoxyCodeLine{00003\ \textcolor{preprocessor}{\#include\ "{}kernel.hpp"{}}} \DoxyCodeLine{00004\ \textcolor{preprocessor}{\#include\ }} \DoxyCodeLine{00005\ \textcolor{preprocessor}{\#include\ }} \DoxyCodeLine{00006\ \textcolor{preprocessor}{\#include\ }} \DoxyCodeLine{00007\ \textcolor{preprocessor}{\#include\ }} \DoxyCodeLine{00008\ } \DoxyCodeLine{00009\ \textcolor{keyword}{namespace\ }tk\ \{} \DoxyCodeLine{00010\ } \DoxyCodeLine{00014\ \textcolor{keyword}{struct\ }Message\ \{} \DoxyCodeLine{00015\ \ \ \ \ uint32\_t\ id;\ \ \ \ } \DoxyCodeLine{00016\ \ \ \ \ uintptr\_t\ arg;\ \ } \DoxyCodeLine{00017\ \};} \DoxyCodeLine{00018\ } \DoxyCodeLine{00028\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ MsgType,\ \textcolor{keywordtype}{size\_t}\ MaxSubscribers\ =\ 4>} \DoxyCodeLine{00029\ \textcolor{keyword}{class\ }EventHub\ \{} \DoxyCodeLine{00030\ \ \ \ \ \textcolor{keyword}{struct\ }Subscriber\ \{} \DoxyCodeLine{00031\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}*\ actor\{\textcolor{keyword}{nullptr}\};} \DoxyCodeLine{00032\ \ \ \ \ \ \ \ \ bool\ (*post\_fn)(\textcolor{keywordtype}{void}*,\ \textcolor{keyword}{const}\ MsgType\&)\{\textcolor{keyword}{nullptr}\};} \DoxyCodeLine{00033\ \ \ \ \ \};} \DoxyCodeLine{00034\ } \DoxyCodeLine{00035\ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{inline}\ Subscriber\ subs\_[MaxSubscribers]\{\};} \DoxyCodeLine{00036\ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{inline}\ \textcolor{keywordtype}{size\_t}\ count\_\{0\};} \DoxyCodeLine{00037\ } \DoxyCodeLine{00038\ \textcolor{keyword}{public}:} \DoxyCodeLine{00045\ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keywordtype}{bool}\ subscribe(\textcolor{keywordtype}{void}*\ actor,\ \textcolor{keywordtype}{bool}\ (*post\_fn)(\textcolor{keywordtype}{void}*,\ \textcolor{keyword}{const}\ MsgType\&))\ \{} \DoxyCodeLine{00046\ \ \ \ \ \ \ \ \ uint32\_t\ save\ =\ detail::sched\_lock();} \DoxyCodeLine{00047\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (count\_\ >=\ MaxSubscribers)\ \{} \DoxyCodeLine{00048\ \ \ \ \ \ \ \ \ \ \ \ \ detail::sched\_unlock(save);} \DoxyCodeLine{00049\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{false};} \DoxyCodeLine{00050\ \ \ \ \ \ \ \ \ \}} \DoxyCodeLine{00051\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{size\_t}\ i\ =\ 0;\ i\ <\ count\_;\ ++i)\ \{} \DoxyCodeLine{00052\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (subs\_[i].actor\ ==\ actor)\ \{} \DoxyCodeLine{00053\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ detail::sched\_unlock(save);} \DoxyCodeLine{00054\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{true};\ \ \textcolor{comment}{//\ 登録済み}} \DoxyCodeLine{00055\ \ \ \ \ \ \ \ \ \ \ \ \ \}} \DoxyCodeLine{00056\ \ \ \ \ \ \ \ \ \}} \DoxyCodeLine{00057\ \ \ \ \ \ \ \ \ subs\_[count\_++]\ =\ \{actor,\ post\_fn\};} \DoxyCodeLine{00058\ \ \ \ \ \ \ \ \ detail::sched\_unlock(save);} \DoxyCodeLine{00059\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{true};} \DoxyCodeLine{00060\ \ \ \ \ \}} \DoxyCodeLine{00061\ } \DoxyCodeLine{00067\ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keywordtype}{bool}\ unsubscribe(\textcolor{keywordtype}{void}*\ actor)\ \{} \DoxyCodeLine{00068\ \ \ \ \ \ \ \ \ uint32\_t\ save\ =\ detail::sched\_lock();} \DoxyCodeLine{00069\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{size\_t}\ i\ =\ 0;\ i\ <\ count\_;\ ++i)\ \{} \DoxyCodeLine{00070\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (subs\_[i].actor\ ==\ actor)\ \{} \DoxyCodeLine{00071\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{size\_t}\ j\ =\ i;\ j\ +\ 1\ <\ count\_;\ ++j)\ \{} \DoxyCodeLine{00072\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ subs\_[j]\ =\ subs\_[j\ +\ 1];} \DoxyCodeLine{00073\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}} \DoxyCodeLine{00074\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ count\_-\/-\/;} \DoxyCodeLine{00075\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ detail::sched\_unlock(save);} \DoxyCodeLine{00076\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{true};} \DoxyCodeLine{00077\ \ \ \ \ \ \ \ \ \ \ \ \ \}} \DoxyCodeLine{00078\ \ \ \ \ \ \ \ \ \}} \DoxyCodeLine{00079\ \ \ \ \ \ \ \ \ detail::sched\_unlock(save);} \DoxyCodeLine{00080\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{false};} \DoxyCodeLine{00081\ \ \ \ \ \}} \DoxyCodeLine{00082\ } \DoxyCodeLine{00089\ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keywordtype}{size\_t}\ publish(\textcolor{keyword}{const}\ MsgType\&\ msg)\ \{} \DoxyCodeLine{00090\ \ \ \ \ \ \ \ \ Subscriber\ local\_subs[MaxSubscribers];} \DoxyCodeLine{00091\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{size\_t}\ n\ =\ 0;} \DoxyCodeLine{00092\ \ \ \ \ \ \ \ \ \{} \DoxyCodeLine{00093\ \ \ \ \ \ \ \ \ \ \ \ \ uint32\_t\ save\ =\ detail::sched\_lock();} \DoxyCodeLine{00094\ \ \ \ \ \ \ \ \ \ \ \ \ n\ =\ count\_;} \DoxyCodeLine{00095\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{size\_t}\ i\ =\ 0;\ i\ <\ n;\ ++i)\ \{} \DoxyCodeLine{00096\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ local\_subs[i]\ =\ subs\_[i];} \DoxyCodeLine{00097\ \ \ \ \ \ \ \ \ \ \ \ \ \}} \DoxyCodeLine{00098\ \ \ \ \ \ \ \ \ \ \ \ \ detail::sched\_unlock(save);} \DoxyCodeLine{00099\ \ \ \ \ \ \ \ \ \}} \DoxyCodeLine{00100\ } \DoxyCodeLine{00101\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{size\_t}\ delivered\ =\ 0;} \DoxyCodeLine{00102\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{size\_t}\ i\ =\ 0;\ i\ <\ n;\ ++i)\ \{} \DoxyCodeLine{00103\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (local\_subs[i].post\_fn\ \&\&\ local\_subs[i].post\_fn(local\_subs[i].actor,\ msg))\ \{} \DoxyCodeLine{00104\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ delivered++;} \DoxyCodeLine{00105\ \ \ \ \ \ \ \ \ \ \ \ \ \}} \DoxyCodeLine{00106\ \ \ \ \ \ \ \ \ \}} \DoxyCodeLine{00107\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ delivered;} \DoxyCodeLine{00108\ \ \ \ \ \}} \DoxyCodeLine{00109\ } \DoxyCodeLine{00111\ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keywordtype}{size\_t}\ subscriber\_count()\ \{} \DoxyCodeLine{00112\ \ \ \ \ \ \ \ \ uint32\_t\ save\ =\ detail::sched\_lock();} \DoxyCodeLine{00113\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{size\_t}\ n\ =\ count\_;} \DoxyCodeLine{00114\ \ \ \ \ \ \ \ \ detail::sched\_unlock(save);} \DoxyCodeLine{00115\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ n;} \DoxyCodeLine{00116\ \ \ \ \ \}} \DoxyCodeLine{00117\ \};} \DoxyCodeLine{00118\ } \DoxyCodeLine{00134\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ MsgType>} \DoxyCodeLine{00135\ \textcolor{keyword}{inline}\ \textcolor{keywordtype}{size\_t}\ publish(\textcolor{keyword}{const}\ MsgType\&\ msg)\ \{} \DoxyCodeLine{00136\ \ \ \ \ \textcolor{keywordflow}{return}\ EventHub::publish(msg);} \DoxyCodeLine{00137\ \}} \DoxyCodeLine{00138\ } \DoxyCodeLine{00146\ \textcolor{keyword}{inline}\ \textcolor{keywordtype}{size\_t}\ publish(uint32\_t\ \textcolor{keywordtype}{id},\ uintptr\_t\ arg\ =\ 0)\ \{} \DoxyCodeLine{00147\ \ \ \ \ \textcolor{keywordflow}{return}\ publish(Message\{id,\ arg\});} \DoxyCodeLine{00148\ \}} \DoxyCodeLine{00149\ } \DoxyCodeLine{00173\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ MsgType\ =\ Message,\ \textcolor{keywordtype}{size\_t}\ QueueSize\ =\ 8>} \DoxyCodeLine{00174\ \textcolor{keyword}{class\ }Actor\ \{} \DoxyCodeLine{00175\ \ \ \ \ \textcolor{keyword}{static\_assert}(QueueSize\ >\ 0,\ \textcolor{stringliteral}{"{}QueueSize\ must\ be\ greater\ than\ 0"{}});} \DoxyCodeLine{00176\ } \DoxyCodeLine{00177\ \textcolor{keyword}{public}:} \DoxyCodeLine{00178\ \ \ \ \ Actor()\ =\ \textcolor{keywordflow}{default};} \DoxyCodeLine{00179\ \ \ \ \ \textcolor{keyword}{virtual}\ \string~Actor()\ \{} \DoxyCodeLine{00180\ \ \ \ \ \ \ \ \ EventHub::unsubscribe(\textcolor{keyword}{this});} \DoxyCodeLine{00181\ \ \ \ \ \}} \DoxyCodeLine{00182\ } \DoxyCodeLine{00191\ \ \ \ \ \textcolor{keywordtype}{bool}\ start(uint32\_t\ prio\ =\ PRIO\_NORMAL)\ \{} \DoxyCodeLine{00192\ \ \ \ \ \ \ \ \ EventHub::subscribe(\textcolor{keyword}{this},\ [](\textcolor{keywordtype}{void}*\ obj,\ \textcolor{keyword}{const}\ MsgType\&\ m)\ \{} \DoxyCodeLine{00193\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{static\_cast<}Actor*\textcolor{keyword}{>}(obj)-\/>post(m);} \DoxyCodeLine{00194\ \ \ \ \ \ \ \ \ \});} \DoxyCodeLine{00195\ \ \ \ \ \ \ \ \ handle\_\ =\ tk::create(task\_entry,\ \textcolor{keyword}{this},\ prio);} \DoxyCodeLine{00196\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ handle\_.is\_valid();} \DoxyCodeLine{00197\ \ \ \ \ \}} \DoxyCodeLine{00198\ } \DoxyCodeLine{00207\ \ \ \ \ \textcolor{keywordtype}{bool}\ post(\textcolor{keyword}{const}\ MsgType\&\ msg)\ \{} \DoxyCodeLine{00208\ \ \ \ \ \ \ \ \ uint32\_t\ save\ =\ detail::sched\_lock();} \DoxyCodeLine{00209\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (count\_\ >=\ QueueSize)\ \{} \DoxyCodeLine{00210\ \ \ \ \ \ \ \ \ \ \ \ \ detail::sched\_unlock(save);} \DoxyCodeLine{00211\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{false};} \DoxyCodeLine{00212\ \ \ \ \ \ \ \ \ \}} \DoxyCodeLine{00213\ \ \ \ \ \ \ \ \ queue\_[tail\_]\ =\ msg;} \DoxyCodeLine{00214\ \ \ \ \ \ \ \ \ tail\_\ =\ (tail\_\ +\ 1)\ \%\ QueueSize;} \DoxyCodeLine{00215\ \ \ \ \ \ \ \ \ count\_++;} \DoxyCodeLine{00216\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (waiting\_)\ \{} \DoxyCodeLine{00217\ \ \ \ \ \ \ \ \ \ \ \ \ waiting\_\ =\ \textcolor{keyword}{false};} \DoxyCodeLine{00218\ \ \ \ \ \ \ \ \ \ \ \ \ detail::wake\_task\_locked(handle\_);} \DoxyCodeLine{00219\ \ \ \ \ \ \ \ \ \}} \DoxyCodeLine{00220\ \ \ \ \ \ \ \ \ detail::sched\_unlock(save);} \DoxyCodeLine{00221\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{true};} \DoxyCodeLine{00222\ \ \ \ \ \}} \DoxyCodeLine{00223\ } \DoxyCodeLine{00230\ \ \ \ \ \textcolor{keywordtype}{bool}\ post(MsgType\&\&\ msg)\ \{} \DoxyCodeLine{00231\ \ \ \ \ \ \ \ \ uint32\_t\ save\ =\ detail::sched\_lock();} \DoxyCodeLine{00232\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (count\_\ >=\ QueueSize)\ \{} \DoxyCodeLine{00233\ \ \ \ \ \ \ \ \ \ \ \ \ detail::sched\_unlock(save);} \DoxyCodeLine{00234\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{false};} \DoxyCodeLine{00235\ \ \ \ \ \ \ \ \ \}} \DoxyCodeLine{00236\ \ \ \ \ \ \ \ \ queue\_[tail\_]\ =\ std::move(msg);} \DoxyCodeLine{00237\ \ \ \ \ \ \ \ \ tail\_\ =\ (tail\_\ +\ 1)\ \%\ QueueSize;} \DoxyCodeLine{00238\ \ \ \ \ \ \ \ \ count\_++;} \DoxyCodeLine{00239\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (waiting\_)\ \{} \DoxyCodeLine{00240\ \ \ \ \ \ \ \ \ \ \ \ \ waiting\_\ =\ \textcolor{keyword}{false};} \DoxyCodeLine{00241\ \ \ \ \ \ \ \ \ \ \ \ \ detail::wake\_task\_locked(handle\_);} \DoxyCodeLine{00242\ \ \ \ \ \ \ \ \ \}} \DoxyCodeLine{00243\ \ \ \ \ \ \ \ \ detail::sched\_unlock(save);} \DoxyCodeLine{00244\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{true};} \DoxyCodeLine{00245\ \ \ \ \ \}} \DoxyCodeLine{00246\ } \DoxyCodeLine{00254\ \ \ \ \ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ U\ =\ MsgType>} \DoxyCodeLine{00255\ \ \ \ \ \textcolor{keyword}{typename}\ std::enable\_if::value,\ \textcolor{keywordtype}{bool}>::type} \DoxyCodeLine{00256\ \ \ \ \ post(uint32\_t\ \textcolor{keywordtype}{id},\ uintptr\_t\ arg\ =\ 0)\ \{} \DoxyCodeLine{00257\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ post(Message\{id,\ arg\});} \DoxyCodeLine{00258\ \ \ \ \ \}} \DoxyCodeLine{00259\ } \DoxyCodeLine{00261\ \ \ \ \ TaskHandle\ handle()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ handle\_;\ \}} \DoxyCodeLine{00262\ } \DoxyCodeLine{00263\ \textcolor{keyword}{protected}:} \DoxyCodeLine{00270\ \ \ \ \ \textcolor{keyword}{virtual}\ \textcolor{keywordtype}{void}\ on\_start()\ \{\}} \DoxyCodeLine{00271\ } \DoxyCodeLine{00280\ \ \ \ \ \textcolor{keyword}{virtual}\ \textcolor{keywordtype}{void}\ on\_message(\textcolor{keyword}{const}\ MsgType\&\ msg)\ =\ 0;} \DoxyCodeLine{00281\ } \DoxyCodeLine{00282\ \textcolor{keyword}{private}:} \DoxyCodeLine{00283\ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keywordtype}{void}\ task\_entry(\textcolor{keywordtype}{void}*\ arg)\ \{} \DoxyCodeLine{00284\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static\_cast<}Actor*\textcolor{keyword}{>}(arg)-\/>event\_loop();} \DoxyCodeLine{00285\ \ \ \ \ \}} \DoxyCodeLine{00286\ } \DoxyCodeLine{00287\ \ \ \ \ \textcolor{keywordtype}{void}\ event\_loop()\ \{} \DoxyCodeLine{00288\ \ \ \ \ \ \ \ \ on\_start();} \DoxyCodeLine{00289\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (;;)\ \{} \DoxyCodeLine{00290\ \ \ \ \ \ \ \ \ \ \ \ \ MsgType\ msg\{\};} \DoxyCodeLine{00291\ \ \ \ \ \ \ \ \ \ \ \ \ uint32\_t\ save\ =\ detail::sched\_lock();} \DoxyCodeLine{00292\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{while}\ (count\_\ ==\ 0)\ \{} \DoxyCodeLine{00293\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ waiting\_\ =\ \textcolor{keyword}{true};} \DoxyCodeLine{00294\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ detail::block\_current\_task\_locked();} \DoxyCodeLine{00295\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ detail::sched\_unlock(save);} \DoxyCodeLine{00296\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ コンテキストスイッチされ、他のタスクが走る。}} \DoxyCodeLine{00297\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ wake\_task\_locked\ で起こされたらここに戻る。}} \DoxyCodeLine{00298\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ save\ =\ detail::sched\_lock();} \DoxyCodeLine{00299\ \ \ \ \ \ \ \ \ \ \ \ \ \}} \DoxyCodeLine{00300\ \ \ \ \ \ \ \ \ \ \ \ \ msg\ =\ std::move(queue\_[head\_]);} \DoxyCodeLine{00301\ \ \ \ \ \ \ \ \ \ \ \ \ head\_\ =\ (head\_\ +\ 1)\ \%\ QueueSize;} \DoxyCodeLine{00302\ \ \ \ \ \ \ \ \ \ \ \ \ count\_-\/-\/;} \DoxyCodeLine{00303\ \ \ \ \ \ \ \ \ \ \ \ \ waiting\_\ =\ \textcolor{keyword}{false};} \DoxyCodeLine{00304\ \ \ \ \ \ \ \ \ \ \ \ \ detail::sched\_unlock(save);} \DoxyCodeLine{00305\ } \DoxyCodeLine{00306\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ メッセージディスパッチ(ロック解除状態で実行)}} \DoxyCodeLine{00307\ \ \ \ \ \ \ \ \ \ \ \ \ on\_message(msg);} \DoxyCodeLine{00308\ \ \ \ \ \ \ \ \ \}} \DoxyCodeLine{00309\ \ \ \ \ \}} \DoxyCodeLine{00310\ } \DoxyCodeLine{00311\ \ \ \ \ MsgType\ queue\_[QueueSize]\{\};} \DoxyCodeLine{00312\ \ \ \ \ \textcolor{keywordtype}{size\_t}\ head\_\{0\};} \DoxyCodeLine{00313\ \ \ \ \ \textcolor{keywordtype}{size\_t}\ tail\_\{0\};} \DoxyCodeLine{00314\ \ \ \ \ \textcolor{keywordtype}{size\_t}\ count\_\{0\};} \DoxyCodeLine{00315\ \ \ \ \ \textcolor{keywordtype}{bool}\ waiting\_\{\textcolor{keyword}{false}\};} \DoxyCodeLine{00316\ \ \ \ \ TaskHandle\ handle\_\{\};} \DoxyCodeLine{00317\ \};} \DoxyCodeLine{00318\ } \DoxyCodeLine{00319\ \}\ \ \textcolor{comment}{//\ namespace\ tk}} \end{DoxyCode}