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.

I<br />

Writing a SCSI-2 Device Driver<br />

*<br />

* RETURNS: N/A<br />

*/<br />

LOCAL void xxxInitEvent<br />

(<br />

XXX_THREAD * pThread,<br />

XXX_EVENT * pEvent<br />

)<br />

{<br />

}<br />

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

*<br />

* xxxSharedMemInit - initialize the fields in a shared memory area<br />

*<br />

* Initialize pointers and counts for all message transfers. These are<br />

* always directed to buffers provided by the SCSI_CTRL structure.<br />

*<br />

* RETURNS: N/A<br />

*/<br />

LOCAL void xxxSharedMemInit<br />

(<br />

SIOP *<br />

pSiop,<br />

XXX_SHARED * pShMem<br />

)<br />

{<br />

}<br />

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

*<br />

* xxxThreadInit - initialize a client thread structure<br />

*<br />

* Initialize the fixed data for a thread (i.e., independent of the command).<br />

* Called once when a thread structure is first created.<br />

*<br />

* RETURNS: OK, or ERROR if an error occurs<br />

*/<br />

LOCAL STATUS xxxThreadInit<br />

(<br />

SIOP *<br />

pSiop,<br />

XXX_THREAD * pThread<br />

)<br />

{<br />

scsiThreadInit (&pThread->scsiThread);<br />

I<br />

return (OK);<br />

}<br />

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

*<br />

* xxxActivate - activate a script corresponding to a new thread<br />

*<br />

* Request activation of (the script for) a new thread, if possible; do not<br />

* wait for the script to complete (or even start) executing. Activation<br />

* is requested by signalling the controller, which causes an interrupt.<br />

347

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

Saved successfully!

Ooh no, something went wrong!