02.03.2014 Views

vxworks programmer's guide.pdf - DAQ Plone Site

vxworks programmer's guide.pdf - DAQ Plone Site

vxworks programmer's guide.pdf - DAQ Plone Site

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

VxWorks 5.4<br />

Programmer’s Guide<br />

/*<br />

* Forever, modify data in private memory and display string in<br />

* global memory.<br />

*/<br />

FOREVER<br />

{<br />

for (val = 0; val stuff = val;<br />

pMem->myStuff = val / 2;<br />

/* make sure can access global virtual memory */<br />

printf (string);<br />

taskDelay (sysClkRateGet() * 10);<br />

}<br />

}<br />

return (OK);<br />

}<br />

/************************************************************************<br />

*<br />

* testVmContextGet - return a task’s virtual memory context stored in TCB<br />

*<br />

* Used with vmContextShow() 1 to display a task’s virtual memory context.<br />

* For example, from the shell, type:<br />

* -> tid = sp (testTask)<br />

* -> vmContextShow (testVmContextGet (tid))<br />

*/<br />

VM_CONTEXT_ID testVmContextGet<br />

(<br />

UINT tid<br />

)<br />

{<br />

return ((VM_CONTEXT_ID) ((taskTcb (tid))->spare1));<br />

}<br />

7.5.3 Noncacheable Memory<br />

Architectures that do not support bus snooping must disable the memory caching<br />

that is used for interprocessor communication (or by DMA devices). If multiple<br />

1. This routine is not built in to the Tornado shell. To use it from the Tornado shell, you must<br />

define INCLUDE_MMU_FULL_SHOW in your VxWorks configuration; see the Tornado<br />

User’s Guide: Projects. When invoked this routine’s output is sent to the standard output<br />

device.<br />

302

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

Saved successfully!

Ooh no, something went wrong!