02.03.2014 Views

BSP Developer's Guide

BSP Developer's Guide

BSP Developer's Guide

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.5<br />

<strong>BSP</strong> Developer’s <strong>Guide</strong><br />

* The script is started by the ISR in response to this event.<br />

*<br />

* NOTE: Interrupt locking is required to ensure that the correct action<br />

* is taken once the controller state has been checked.<br />

*<br />

* RETURNS: OK, or ERROR if the controller is in an invalid state (this<br />

* indicates a major software failure).<br />

*/<br />

LOCAL STATUS xxxActivate<br />

(<br />

SIOP *<br />

pSiop,<br />

XXX_THREAD * pThread<br />

)<br />

{<br />

key = intLock ();<br />

/* Activate controller for the current thread */<br />

intUnlock (key);<br />

return (status);<br />

}<br />

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

*<br />

* xxxAbort - abort the active script corresponding to the current thread<br />

*<br />

* Check that there is currently an active script running. If so, set the<br />

* SCSI controller Abort flag which halts the script and causes an<br />

* interrupt.<br />

*<br />

* RETURNS: N/A<br />

*/<br />

LOCAL void xxxAbort<br />

(<br />

SIOP * pSiop /* ptr to controller info */<br />

)<br />

{<br />

STATUS status;<br />

int key;<br />

key = intLock ();<br />

/* Abort the active script corresponding to the current thread */<br />

intUnlock (key);<br />

}<br />

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

*<br />

* xxxScriptStart - start the SCSI controller executing a script<br />

*<br />

* Restore the SCSI controller register context, including the shared memory<br />

* area, from the thread context. Put the address of the script entry point<br />

348

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

Saved successfully!

Ooh no, something went wrong!