GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > IPBS / V0-0-1

Constituent: pbs     Tag: i845e


Interface   Data Structures   File List   Data Fields   Globals  

PBS.c.vx-xxx-xxx File Reference

PBS library, contains the X86 specific code for PBS. More...

#include <stdlib.h>
#include <string.h>

Include dependency graph for PBS.c.vx-xxx-xxx:


Functions

void PBS_fast_clear (void *ptr, unsigned int nbytes)
 Clears (Zeroes) the specified memory.

Detailed Description

PBS library, contains the X86 specific code for PBS.

Author:
JJRussell - russell@slac.stanford.edu
   CVS $Id: PBS.c.vx-xxx-xxx,v 1.1.1.1 2006/02/10 21:45:35 saxton Exp $

Function Documentation

void PBS_fast_clear void *  ptr,
unsigned int  nbytes
 

Clears (Zeroes) the specified memory.

Parameters:
ptr Pointer to the memory to zero
nbytes The number of bytes to zero
This provides a fast way of zeroing large chunks of memory on PPC platforms using the dcbz instruction. This instruction zeroes a cache line at a time. The savings in speed varies by processor, but factors of 5 or more are in the ballpark, saturating out at a factor of 2 once the data cache size is exceeded (32Kbytes).
On other platforms, the library supplied routine is used.
Warning:
On PPC platforms, this will work if and only if the memory being cleared is cache enabled. For the most part this is not a problem since usually all memory but memory mapped to IO space and set aside for driver use is marked cacheable. This routine does check to make sure the data cache is globally enabled. If not, the generic clear routine is called. The routine is protected if the data cache is globally disabled, in this case, dropping make and using the generic routine.


Generated on Fri Feb 10 20:22:22 2006 by  doxygen 1.4.4