02.03.2014 Views

BSP Developer's Guide

BSP Developer's Guide

BSP Developer's Guide

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.

VxWorks 5.5<br />

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

/* Update thread context; activate the thread */<br />

xxxThreadUpdate (pThread);<br />

if (xxxActivate (pSiop, pThread) != OK)<br />

return (ERROR);<br />

pScsiCtrl->pThread = pScsiThread;<br />

xxxThreadStateSet (pThread, SCSI_THREAD_ESTABLISHED);<br />

return (OK);<br />

}<br />

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

*<br />

* xxxThreadAbort - abort a thread<br />

*<br />

* If the thread is not currently connected, do nothing and return FALSE to<br />

* indicate that the SCSI manager should abort the thread.<br />

*<br />

* RETURNS: TRUE if the thread is being aborted by this driver (i.e. it is<br />

* currently active on the controller, else FALSE.<br />

*/<br />

LOCAL BOOL xxxThreadAbort<br />

(<br />

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

XXX_THREAD * pThread /* ptr to thread info */<br />

)<br />

{<br />

xxxAbort (pSiop);<br />

xxxThreadStateSet (pThread, SCSI_THREAD_ABORTING);<br />

return (TRUE);<br />

}<br />

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

*<br />

* xxxEvent - XXX SCSI controller event processing routine<br />

*<br />

* Parse the event type and act accordingly. Controller-level events are<br />

* handled within this function, and the event is then passed to the current<br />

* thread (if any) for thread-level processing.<br />

*<br />

* RETURNS: N/A<br />

*/<br />

LOCAL void xxxEvent<br />

(<br />

SIOP * pSiop,<br />

XXX_EVENT * pEvent<br />

)<br />

{<br />

SCSI_CTRL * pScsiCtrl = (SCSI_CTRL *) pSiop;<br />

SCSI_EVENT * pScsiEvent = (SCSI_EVENT *) pEvent;<br />

XXX_THREAD * pThread = (XXX_THREAD *) pScsiCtrl->pThread;<br />

344

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

Saved successfully!

Ooh no, something went wrong!