06.08.2013 Views

pSOSystem System Calls - Read

pSOSystem System Calls - Read

pSOSystem System Calls - Read

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

t_mode pSOS+ <strong>System</strong> <strong>Calls</strong><br />

Target<br />

T_ISR / T_NOISR Hardware interrupts are enabled / disabled while the task<br />

runs.<br />

These options are available only on certain processors. See<br />

“Interrupt Control” under “Target.”<br />

T_LEVELMASK0<br />

through<br />

T_LEVELMASKn<br />

To create the argument new_mode, you pick symbolic constants from the pairs<br />

described above. For instance, to specify that a task have preemption turned off,<br />

you place the symbolic constant T_NOPREEMPT in new_mode. To specify that the<br />

task have preemption turned off and roundrobin by time-slicing turned on, you<br />

place both T_NOPREEMPT and T_TSLICE in new_mode, using the following syntax:<br />

T_NOPREEMPT | T_TSLICE<br />

The argument mask specifies the bit mask used to permit attribute modifications,<br />

and as such, it must contain both of the symbolic constants from each pair whose<br />

attribute is to be modified. For instance, to enable modification of preemption mode,<br />

you place both T_PREEMPT and T_NOPREEMPT in mask. To enable modification of<br />

both preemption mode and roundrobin mode, you place both symbolic constants<br />

from both pairs in mask, as below:<br />

T_PREEMPT | T_NOPREEMPT | T_NOTSLICE | T_TSLICE<br />

Interrupt Control<br />

Certain hardware interrupts are disabled while the task runs.<br />

These options are available only on certain processors. See<br />

“Interrupt Control” under “Target.”<br />

Interrupt control means that while a task is executing, hardware interrupts are<br />

disabled. On some processors, you can disable all interrupts at or below a certain<br />

interrupt level and enable all interrupts above that level. On other processors you<br />

1-146 <strong>pSO<strong>System</strong></strong> <strong>System</strong> <strong>Calls</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!