1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125
|
<refentry id="VisualOS-Procesor-Interface">
<refmeta>
<refentrytitle>Procesor Interface</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>VISUALOS Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>Procesor Interface</refname><refpurpose>CPU interface to the other subsystems.</refpurpose>
</refnamediv>
<refsynopsisdiv><title>Synopsis</title>
<synopsis>
void <link linkend="cpu-register-proc-creat">cpu_register_proc_creat</link> (<link linkend="proc-creat-callback-t">proc_creat_callback_t</link> func);
void <link linkend="cpu-register-proc-finish">cpu_register_proc_finish</link> (<link linkend="proc-finish-callback-t">proc_finish_callback_t</link> func);
void (<link linkend="proc-creat-callback-t">*proc_creat_callback_t</link>) (<link linkend="gint">gint</link> pid);
void (<link linkend="proc-finish-callback-t">*proc_finish_callback_t</link>) (<link linkend="gint">gint</link> pid);
void <link linkend="CPU-terminate-proc">CPU_terminate_proc</link> (<link linkend="gint">gint</link> pid);
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
This functions allow the other subsystems to interact, througth the messaging
service, with the CPU.
</para>
</refsect1>
<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="cpu-register-proc-creat">cpu_register_proc_creat ()</title>
<programlisting>void cpu_register_proc_creat (<link linkend="proc-creat-callback-t">proc_creat_callback_t</link> func);</programlisting>
<para>
Registers <parameter>func</parameter> to be called when ever a new process gets created.</para>
<para>
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>func</parameter> :</entry>
<entry> function to be called.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="cpu-register-proc-finish">cpu_register_proc_finish ()</title>
<programlisting>void cpu_register_proc_finish (<link linkend="proc-finish-callback-t">proc_finish_callback_t</link> func);</programlisting>
<para>
Registers <parameter>func</parameter> to be called when ever a process is terminated.</para>
<para>
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>func</parameter> :</entry>
<entry> function to be called.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="proc-creat-callback-t">proc_creat_callback_t ()</title>
<programlisting>void (*proc_creat_callback_t) (<link linkend="gint">gint</link> pid);</programlisting>
<para>
Function pointer type for the callback used on <parameter>cpu_register_proc_creat</parameter>.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>pid</parameter> :</entry>
<entry>Process ID of the created process.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="proc-finish-callback-t">proc_finish_callback_t ()</title>
<programlisting>void (*proc_finish_callback_t) (<link linkend="gint">gint</link> pid);</programlisting>
<para>
Function pointer type for the callback used on <parameter>cpu_register_proc_finish</parameter>.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>pid</parameter> :</entry>
<entry>Process ID of the terminated process.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="CPU-terminate-proc">CPU_terminate_proc ()</title>
<programlisting>void CPU_terminate_proc (<link linkend="gint">gint</link> pid);</programlisting>
<para>
Terminate process <parameter>pid</parameter>.</para>
<para>
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>pid</parameter> :</entry>
<entry> Process to terminates.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
</refsect1>
</refentry>
|