06.08.2013 Views

pSOSystem System Calls - Read

pSOSystem System Calls - Read

pSOSystem System Calls - Read

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

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

Return Value<br />

Error Codes<br />

Notes<br />

can simply specify that all interrupts are either enabled or disabled. Details are<br />

provided below:<br />

PPC<br />

x86<br />

MIPS<br />

ARM<br />

NOTE: t_mode() stores in old_mode the previous setting of the interrupt<br />

control value as stored in the task's TCB (called the true mode), rather<br />

than the value in the task's processor status register (called the transient<br />

mode.) These two modes are normally the same. The one instance when<br />

they can be different is if the task changes the interrupt control value<br />

without using t_mode().<br />

Processor Mode<br />

t_mode() cannot modify the task’s processor mode. Most processors only have one<br />

processor mode, so this is not relevant. Exceptions are handled as follows:<br />

This system call always returns 0.<br />

None.<br />

Multiprocessor Considerations<br />

None. Because t_mode() affects only the calling task, its action stays on the local<br />

node.<br />

Callable From<br />

■ Task<br />

On PowerPC, x86, MIPS, and ARM processors, you can simply enable or<br />

disable all hardware interrupts. To do this, you place both T_ISR and<br />

T_NOISR in the mask argument and place either T_ISR or T_NOISR in<br />

the new_mode argument.<br />

<strong>pSO<strong>System</strong></strong> <strong>System</strong> <strong>Calls</strong> 1-147<br />

1

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

Saved successfully!

Ooh no, something went wrong!