1007
VxWorks KERNEL API REFERENCE Volume 2: Routines ® 6.2 VxWorks Kernel API Reference

KERNEL API REFERENCE Volume 2: Routines - pudn.comread.pudn.com/downloads153/...reference_vol2_6.2.pdf · iii Contents The VxWorks Kernel API Reference is a two-volume set that provides

  • Upload
    others

  • View
    24

  • Download
    3

Embed Size (px)

Citation preview

  • VxWorks

    KER NEL AP I REFERENCE

    Volume 2 : Rout ines

    ®

    6.2

    VxWorks Kernel API Reference

  • Copyright © 2005 Wind River Systems, Inc.

    All rights reserved. No part of this publication may be reproduced or transmitted in any form or by any means without the prior written permission of Wind River Systems, Inc.

    Wind River, the Wind River logo, Tornado, and VxWorks are registered trademarks of Wind River Systems, Inc. Any third-party trademarks referenced are the property of their respective owners. For further information regarding Wind River trademarks, please see:

    http://www.windriver.com/company/terms/trademark.html

    This product may include software licensed to Wind River by third parties. Relevant notices (if any) are provided in your product installation at the following location: installDir/product_name/3rd_party_licensor_notice.pdf.

    Wind River may refer to third-party documentation by listing publications or providing links to third-party Web sites for informational purposes. Wind River accepts no responsibility for the information provided in such third-party documentation.

    Corporate HeadquartersWind River Systems, Inc.500 Wind River WayAlameda, CA 94501-1153U.S.A.

    toll free (U.S.): (800) 545-WINDtelephone: (510) 748-4100facsimile: (510) 749-2010

    For additional contact information, please visit the Wind River URL:

    http://www.windriver.com

    For information on how to contact Customer Support, please visit the following URL:

    http://www.windriver.com/support

    VxWorks Kernel API Reference, 6.2 19 Dec 05 Part #: DOC-15604-ND-00

    http://www.windriver.com/company/terms/trademark.htmlhttp://www.windriver.comhttp://www.windriver.com/support

  • iii

    Contents

    The VxWorks Kernel API Reference is a two-volume set that provides reference entries describing the facilities available in the VxWorks kernel. For reference entries that describe facilities for VxWorks process-based application development, see the VxWorks Application API Reference. For reference entries that describe VxWorks drivers, see the VxWorks Drivers API Reference.

    Volume 1: Libraries

    Volume 1 provides reference entries for each of the VxWorks kernel libraries, arranged alphabetically. Each entry lists the routines found in the library, including a one-line synopsis of each and a general description of their use.

    Individual reference entries for each of the available functions in these libraries is provided in Volume 2.

    Volume 2: Routines

    Volume 2 (this book) provides reference entries for each of the routines found in the VxWorks kernel libraries documented in Volume 1.

    Keyword Index

    The keyword index is provided in Volume 1 only. It covers both Volume 1 and Volume 2. Page numbers for index entries are prefixed with “1-” or “2-” indicating the volume in which the reference entry appears.

    The keyword index is a “permuted index” of keywords found in the NAME line of each reference entry. The keyword for each index item is left-aligned in column 2. The remaining words in column 1 and 2 show the context for the keyword.

  • VxWorks Kernel API Reference, 6.2

    iv

  • 1

    Volume 2Routines

    CPToUtf16( ) – convert a Unicode codepoint to a UTF-16 encoding ............................... 37CPToUtf8( ) – convert a Unicode codepoint to a UTF-8 encoding ................................. 37Sysctl( ) – get or set values for run time variables from the C shell ........................ 38_rtpSigqueue( ) – send a queued signal to a RTP with a specific signal code..................... 39_rtpTaskSigqueue( ) – send a queued signal to a task with a specific signal code..................... 40a0( ) – return the contents of register a0 (also a1 - a7) (MC680x0) .................... 40access( ) – determine accessibility of a file................................................................... 41acosf( ) – compute an arc cosine (ANSI) .................................................................... 42adrSpaceInfoGet( ) – get status of the address space library....................................................... 42adrSpaceRAMAddToPool( ) – add specified memory block to RAM pool ............................................... 43adrSpaceShow( ) – display information about address spaces managed by adrSpaceLib . 44aimCacheInit( ) – initialize cache aim with supplied parameters......................................... 45aimFppLibInit( ) – Initialize the AIM FPU library .................................................................... 46aimMmuLibInit( ) – initialize the AIM .......................................................................................... 46aioShow( ) – show AIO requests ....................................................................................... 47aioSysInit( ) – initialize the AIO system driver ................................................................. 47aio_cancel( ) – cancel an asynchronous I/O request (POSIX).......................................... 48aio_error( ) – retrieve error status of asynchronous I/O operation (POSIX)............... 49aio_fsync( ) – asynchronous file synchronization (POSIX) ............................................. 49aio_read( ) – initiate an asynchronous read (POSIX) ..................................................... 50aio_return( ) – retrieve return status of asynchronous I/O operation (POSIX) ............ 51

  • VxWorks Kernel API Reference, 6.2

    2

    aio_suspend( ) – wait for asynchronous I/O request(s) (POSIX)........................................... 51aio_write( ) – initiate an asynchronous write (POSIX) ........................................................ 52alarm( ) – set an alarm clock for delivery of a signal..................................................... 53asinf( ) – compute an arc sine (ANSI) ............................................................................ 53atan2f( ) – compute the arc tangent of y/x (ANSI) ........................................................ 54atanf( ) – compute an arc tangent (ANSI)...................................................................... 54attrib( ) – modify MS-DOS file attributes on a file or directory .................................. 55b( ) – set or display breakpoints ............................................................................... 55bcmp( ) – compare one buffer to another ....................................................................... 56bcopy( ) – copy one buffer to another .............................................................................. 57bcopyBytes( ) – copy one buffer to another one byte at a time.............................................. 58bcopyLongs( ) – copy one buffer to another one long word at a time ................................... 58bcopyWords( ) – copy one buffer to another one word at a time............................................ 59bd( ) – delete a breakpoint ........................................................................................... 59bdall( ) – delete all breakpoints ....................................................................................... 60bfStrSearch( ) – Search using the Brute Force algorithm ........................................................ 61bfill( ) – fill a buffer with a specified character ........................................................... 61bfillBytes( ) – fill buffer with a specified character one byte at a time.............................. 62bh( ) – set a hardware breakpoint............................................................................... 62binvert( ) – invert the order of bytes in a buffer ............................................................... 63bmsStrSearch( ) – Search using the Boyer-Moore-Sunday (Quick Search) algorithm ........... 64bootBpAnchorExtract( ) – extract a backplane address from a device field .......................................... 64bootChange( ) – change the boot line ......................................................................................... 65bootLeaseExtract( ) – extract the lease information from an Internet address .............................. 66bootNetmaskExtract( ) – extract the net mask field from an Internet address.................................... 67bootParamsPrompt( ) – prompt for boot line parameters .................................................................... 67bootParamsShow( ) – display boot line parameters........................................................................... 68bootStringToStruct( ) – interpret the boot parameters from the boot line......................................... 68bootStringToStructAdd( ) – interpret the boot parameters from the boot line......................................... 69bootStructToString( ) – construct a boot line ......................................................................................... 69bswap( ) – swap buffers ...................................................................................................... 70bzero( ) – zero out a buffer................................................................................................ 70c( ) – continue from a breakpoint............................................................................. 71cache20kxLibInit( ) – initialize the 20kx cache library ...................................................................... 72cache4kcLibInit( ) – initialize the 4kc cache library ........................................................................ 72cacheArchClearEntry( ) – clear an entry from a cache (68K, x86)........................................................... 73cacheArchLibInit( ) – initialize the cache library ............................................................................... 74cacheAuLibInit( ) – initialize the Au cache library......................................................................... 75cacheClear( ) – clear all or some entries from a cache............................................................ 76cacheDisable( ) – disable the specified cache .............................................................................. 76cacheDmaFree( ) – free the buffer acquired with cacheDmaMalloc( ) ...................................... 77cacheDmaMalloc( ) – allocate a cache-safe buffer for DMA devices and drivers ......................... 77cacheDrvFlush( ) – flush the data cache for drivers ...................................................................... 78cacheDrvInvalidate( ) – invalidate data cache for drivers .................................................................... 78cacheDrvPhysToVirt( ) – translate a physical address for drivers ........................................................ 79

  • Volume 2: Libraries

    3

    cacheDrvVirtToPhys( ) – translate a virtual address for drivers........................................................... 79cacheEnable( ) – enable the specified cache............................................................................... 80cacheFlush( ) – flush all or some of a specified cache............................................................ 80cacheForeignClear( ) – clear foreign data from selected cache.......................................................... 81cacheForeignFlush( ) – flush foreign data from selected cache ......................................................... 81cacheForeignInvalidate( ) – invalidate foreign data from selected cache................................................. 82cacheInvalidate( ) – invalidate all or some of a specified cache ................................................... 82cacheLibInit( ) – initialize the cache library for a processor architecture.............................. 83cacheLock( ) – lock all or part of a specified cache................................................................ 84cachePipeFlush( ) – flush processor write buffers to memory ..................................................... 84cacheR10kLibInit( ) – initialize the R10000 cache library ................................................................. 85cacheR32kLibInit( ) – initialize the RC32364 cache library .............................................................. 85cacheR333x0LibInit( ) – initialize the R333x0 cache library ................................................................. 86cacheR33kLibInit( ) – initialize the R33000 cache library ................................................................. 86cacheR3kLibInit( ) – initialize the R3000 cache library ................................................................... 87cacheR4kLibInit( ) – initialize the R4000 cache library ................................................................... 87cacheR5kLibInit( ) – initialize the R5000 cache library ................................................................... 88cacheR7kLibInit( ) – initialize the R7000 cache library ................................................................... 89cacheSh7750LibInit( ) – initialize the SH7750 cache library ................................................................ 89cacheStoreBufDisable( ) – disable the store buffer (MC68060 only)....................................................... 91cacheStoreBufEnable( ) – enable the store buffer (MC68060 only)........................................................ 91cacheTextUpdate( ) – synchronize the instruction and data caches ............................................... 92cacheTx49LibInit( ) – initialize the Tx49 cache library ..................................................................... 92cacheUnlock( ) – unlock all or part of a specified cache........................................................... 93calloc( ) – allocate space for an array (ANSI)................................................................. 93cbioBlkCopy( ) – block to block (sector to sector) transfer routine ......................................... 94cbioBlkRW( ) – transfer blocks to or from memory................................................................ 94cbioBytesRW( ) – transfer bytes to or from memory ................................................................. 95cbioDevCreate( ) – Initialize a CBIO device (Generic) ................................................................. 96cbioDevVerify( ) – verify CBIO_DEV_ID........................................................................................ 96cbioIoctl( ) – perform ioctl operation on device ................................................................. 97cbioLibInit( ) – Initialize CBIO Library.................................................................................... 98cbioLock( ) – obtain CBIO device semaphore. .................................................................... 98cbioModeGet( ) – return the mode setting for CBIO device ..................................................... 99cbioModeSet( ) – set mode for CBIO device ............................................................................... 99cbioParamsGet( ) – fill in CBIO_PARAMS structure with CBIO device parameters ................. 100cbioRdyChgdGet( ) – determine ready status of CBIO device ........................................................ 100cbioRdyChgdSet( ) – force a change in ready status of CBIO device ............................................ 101cbioShow( ) – print information about a CBIO device ........................................................ 102cbioUnlock( ) – release CBIO device semaphore. ................................................................... 102cbioWrapBlkDev( ) – create CBIO wrapper atop a BLK_DEV device............................................. 103cbrt( ) – compute a cube root ........................................................................................ 104cbrtf( ) – compute a cube root ........................................................................................ 104cd( ) – change the default directory........................................................................... 105cdromFsDevCreate( ) – create a CD-ROM filesystem (cdromFs) I/O device................................... 106

  • VxWorks Kernel API Reference, 6.2

    4

    cdromFsDevDelete( ) – delete a CD-ROM filesystem (cdromFs) I/O device ......................... 107cdromFsInit( ) – initialize the VxWorks CD-ROM file system ...................................... 107cdromFsVersionDisplay( ) – display the cdromFs version number .................................................. 108cdromFsVersionNumGet( ) – return the cdromFs version number .................................................... 108cdromFsVolConfigShow( ) – show the volume configuration information...................................... 109ceilf( ) – compute the smallest integer greater than or equal to a specified value

    (ANSI)........................................................................................................ 109cfree( ) – free block of memory from system memory partition (kernel heap) 110chdir( ) – set the current default path ................................................................... 110checkStack( ) – print a summary of each task's stack usage ........................................ 111chkdsk( ) – perform consistency checking on a MS-DOS file system.................. 112chmod( ) – change the permission mode of a file .................................................. 113clock_getres( ) – get the clock resolution (POSIX) ........................................................... 114clock_gettime( ) – get the current time of the clock (POSIX) ............................................ 115clock_setres( ) – set the clock resolution........................................................................... 115clock_settime( ) – set the clock to a specified time (POSIX) ............................................. 116close( ) – close a file ................................................................................................. 116closedir( ) – close a directory (POSIX) ....................................................................... 117copy( ) – copy in (or stdin) to out (or stdout)....................................................... 117copyStreams( ) – copy from/to specified streams............................................................ 118coreDumpClose( ) – close a core dump ................................................................................... 119coreDumpCopy( ) – copy a core dump to the given path..................................................... 119coreDumpCreateHookAdd( ) – add a routine to be called at every core dump create........................ 120coreDumpCreateHookDelete( ) – delete a previously added core dump create routine........................ 120coreDumpDevFormat( ) – format the core dump device ................................................................ 121coreDumpDevShow( ) – display information on core dump device .......................................... 121coreDumpInfoGet( ) – get information on a core dump ........................................................... 122coreDumpIsAvailable( ) – is a core dump available for retrieval .................................................. 123coreDumpMemDump( ) – dump an area of memory in VxWorks core dump............................ 123coreDumpMemFilterAdd( ) – add a memory region filter.................................................................... 124coreDumpMemFilterDelete( ) – delete a memory region filter ................................................................ 124coreDumpNextGet( ) – get the next core dump on device......................................................... 125coreDumpOpen( ) – open an existing core dump for retrieval ............................................ 125coreDumpRead( ) – read from a core file................................................................................ 126coreDumpShow( ) – display information on core dumps..................................................... 127coreDumpUsrGenerate( ) – generate a user (on-demand) core dump ............................................ 128cosf( ) – compute a cosine (ANSI) ....................................................................... 129coshf( ) – compute a hyperbolic cosine (ANSI) ................................................... 129cp( ) – copy file into other file/directory......................................................... 130cplusCallNewHandler( ) – call the allocation failure handler (C++).............................................. 130cplusCtors( ) – call static constructors (C++)................................................................. 131cplusCtorsLink( ) – call all linked static constructors (C++) ............................................... 132cplusDemanglerSet( ) – change C++ demangling mode (C++) ................................................. 132cplusDemanglerStyleSet( ) – change C++ demangling style (C++) ................................................... 133cplusDtors( ) – call static destructors (C++)................................................................... 134

  • Volume 2: Libraries

    5

    cplusDtorsLink( ) – call all linked static destructors (C++).................................................... 135cplusLibInit( ) – initialize the C++ library (C++) ............................................................... 135cplusXtorGet( ) – get the c++ Xtors strategy......................................................................... 136cplusXtorSet( ) – change C++ static constructor calling strategy (C++) .......................... 136cpsr( ) – return the contents of the current processor status register (ARM) .. 137cpuPwrMgrEnable( ) – set the CPU light Power management to ON/OFF. ............................ 137cpuPwrMgrIsEnabled( ) – get the CPU Power management status................................................. 138cpuPwrUtilMgrInit( ) – init the Utilization power manager......................................................... 138creat( ) – create a file .................................................................................................. 139cret( ) – continue until the current subroutine returns....................................... 140d( ) – display memory......................................................................................... 141d0( ) – return the contents of register d0 (also d1 - d7) (MC680x0)................ 141dbgBpTypeBind( ) – bind breakpoint handler to type (MIPS R3000, R4000, R4650) ........... 142dbgHelp( ) – display debugging help menu................................................................. 142dbgInit( ) – initialize the shell debugging package ................................................... 143dcacheDevCreate( ) – create a disk cache ..................................................................................... 144dcacheDevDisable( ) – disable the disk cache for this device ..................................................... 144dcacheDevEnable( ) – reenable the disk cache ............................................................................. 145dcacheDevMemResize( ) – set a new size to a disk cache device ...................................................... 145dcacheDevTune( ) – modify tunable disk cache parameters................................................... 146dcacheHashTest( ) – test hash table integrity............................................................................. 147dcacheShow( ) – print information about disk cache......................................................... 148devs( ) – list all system-known devices .................................................................. 148dirList( ) – list contents of a directory (multi-purpose) ........................................... 149diskFormat( ) – format a disk with dosFs .......................................................................... 149diskInit( ) – initialize a file system on a block device ................................................ 150dosFsCacheCreate( ) – create disk cache for a dosFs volume ..................................................... 150dosFsCacheDelete( ) – delete the disk cache for a dosFs volume............................................... 151dosFsCacheOptionsGet( ) – get this dosFs volume's disk cache options ........................................... 151dosFsCacheOptionsSet( ) – set this dosFs volume's disk cache options............................................ 152dosFsCacheShow( ) – show information regarding a dosFs volume's cache.......................... 152dosFsChkDsk( ) – make volume integrity checking. ............................................................ 153dosFsDefaultCacheSizeGet( ) – get the default disk cache size ................................................................. 154dosFsDefaultCacheSizeSet( ) – set the default disk cache size.................................................................. 154dosFsDevCreate( ) – create file system device. .......................................................................... 155dosFsDevDelete( ) – delete a dosFs volume............................................................................... 156dosFsLastAccessDateEnable( ) – enable last access date updating for this volume ................................. 157dosFsLibInit( ) – prepare to use the dosFs library.............................................................. 157dosFsShow( ) – display dosFs volume configuration data. ............................................ 158dosFsVolDescGet( ) – convert a device name into a DOS volume descriptor pointer........... 158dosFsVolFormat( ) – format an MS-DOS compatible volume ................................................. 159dosFsVolFormatFd( ) – format an MS-DOS compatible volume via an opened FD................. 160dosSetVolCaseSens( ) – set case sensitivity of volume .................................................................. 161dosfsDiskFormat( ) – format a disk with dosFs .......................................................................... 161dpartDevCreate( ) – Initialize a partitioned disk ...................................................................... 162

  • VxWorks Kernel API Reference, 6.2

    6

    dpartPartGet( ) – retrieve handle for a partition......................................................... 162dsiDataPoolShow( ) – display DSI's data pool statistics .................................................... 163dsiSysPoolShow( ) – display DSI's system pool statistics ............................................... 163dumpPDE( ) – dump page directory table entry for a given virtual address.... 164dumpPDE( ) – dump page directory table entry for a given virtual address.... 164dumpPDE32( ) – dump page directory table entry for a given virtual address.... 165dumpPDE36( ) – dump page directory table entry for a given virtual address.... 165dumpPTE( ) – dump page table entry for a given virtual address. .................... 166dumpPTE( ) – dump page table entry for a given virtual address. .................... 166dup( ) – duplicate a file descriptor number................................................. 167dup2( ) – dup a given fd number into a specific fd slot ................................ 167e( ) – set or display eventpoints (WindView) ........................................ 168edi( ) – return contents of register edi (also esi - eax) (x86) .................... 169edi( ) – return contents of register edi (also esi - eax) (x86/SimNT) ..... 169edrBootCountGet( ) – returns the current boot count........................................................ 170edrBootShow( ) – show all stored boot type ED&R records...................................... 170edrClear( ) – a synonym for edrErrorLogClear( )............................................... 171edrErrLogAttach( ) – attach to an existing log ................................................................... 171edrErrLogClear( ) – clear the log's contents ..................................................................... 172edrErrLogCreate( ) – create a new log ................................................................................ 172edrErrLogIterCreate( ) – create an iterator for traversing the log......................................... 173edrErrLogIterNext( ) – returns the next committed node ................................................... 173edrErrLogMaxNodeCount( ) – return maximum number of nodes in the log.............................. 174edrErrLogNodeAlloc( ) – allocate a node from the error log .................................................. 174edrErrLogNodeCommit( ) – commits a previously allocated node............................................ 175edrErrLogNodeCount( ) – return the number of committed nodes in the log ...................... 175edrErrorInject( ) – injects an error into the ED&R subsystem .................................... 176edrErrorInjectHookAdd( ) – adds a hook which gets called on error-injection ........................ 177edrErrorInjectHookDelete( ) – removes an existing error-inject hook ........................................... 178edrErrorInjectPrePostHookAdd( ) – add hook called before and after error-injection ......................... 179edrErrorInjectPrePostHookDelete( ) – remove the existing pre/post hook ............................................... 180edrErrorInjectTextHookAdd( ) – add hook which gets called on record creation ........................... 180edrErrorInjectTextHookDelete( ) – removes the existing text writing hook......................................... 181edrErrorLogClear( ) – clears the ED&R error log................................................................ 181edrErrorRecordCount( ) – returns the number of error-records in the log ............................ 182edrErrorRecordDecode( ) – decode one error-record .................................................................. 182edrFatalShow( ) – show all stored fatal type ED&R records...................................... 183edrFlagsGet( ) – return the ED&R flags which are currently set ............................ 183edrHelp( ) – prints helpful information on ED&R............................................. 184edrHookShow( ) – show the list of installed ED&R hook routines ............................ 184edrInfoShow( ) – show all stored info type ED&R records....................................... 185edrInitShow( ) – show all stored init type ED&R records........................................ 185edrInjectHookShow( ) – show the list of error injection hook routines............................... 186edrInjectPrePostHookShow( ) – show list of pre/post injection hook routines .............................. 186edrInjectTextHookShow( ) – show the list of text injection hook routines................................. 186

  • Volume 2: Libraries

    7

    edrIntShow( ) – show all stored interrupt type ED&R records.......................................... 187edrIsDebugMode( ) – is the ED&R debug mode flag set?............................................................. 187edrKernelShow( ) – show all stored kernel type ED&R records............................................... 188edrLibInit( ) – initializes edrLib ........................................................................................... 188edrRebootShow( ) – show all stored reboot type ED&R records .............................................. 189edrRtpShow( ) – show all stored rtp type ED&R records..................................................... 189edrShow( ) – displays the ED&R error log to stdout ...................................................... 190edrSystemDebugModeGet( ) – indicates if the system is in debug mode .................................................. 191edrSystemDebugModeInit( ) – initialise the system mode debug flag ....................................................... 191edrSystemDebugModeSet( ) – modifies the system debug mode flag ...................................................... 191edrUserShow( ) – show all stored user type ED&R records .................................................. 192eflags( ) – return the contents of the status register (x86) ......................................... 192eflags( ) – return the contents of the status register (x86/SimNT) .......................... 193envGet( ) – return a pointer to the environment of a task........................................... 193envLibInit( ) – initialize environment variable facility...................................................... 194envPrivateCreate( ) – create a private environment ...................................................................... 194envPrivateDestroy( ) – destroy a private environment ................................................................... 195envShow( ) – display the environment for a task ............................................................ 195errnoGet( ) – get the error status value of the calling task ............................................. 196errnoOfTaskGet( ) – get the error status value of a specified task............................................. 196errnoOfTaskSet( ) – set the error status value of a specified task ............................................. 197errnoSet( ) – set the error status value of the calling task.............................................. 197eventClear( ) – clear the calling task's events register........................................................ 198eventReceive( ) – wait for event(s) ............................................................................................ 198eventSend( ) – send event(s).................................................................................................. 200excConnect( ) – connect a C routine to an exception vector (PowerPC)........................... 201excCrtConnect( ) – connect a C routine to a critical exception vector (PowerPC 403) ......... 201excHookAdd( ) – specify a routine to be called with exceptions.......................................... 202excInit( ) – initialize the exception handling package................................................. 203excIntConnect( ) – connect C routine to asynchronous exception vector (PowerPC, ARM) 203excIntCrtConnect( ) – connect a C routine to a critical interrupt vector (PowerPC 403) .......... 204excJobAdd( ) – request a task-level function call from interrupt level ............................ 205excVecGet( ) – get a CPU exception vector (PowerPC, ARM) ......................................... 206excVecInit( ) – initialize the exception/interrupt vectors ................................................. 206excVecSet( ) – set a CPU exception vector (PowerPC, ARM).......................................... 207exit( ) – exit a task (ANSI) ......................................................................................... 208expf( ) – compute an exponential value (ANSI) ...................................................... 209fabsf( ) – compute an absolute value (ANSI) ............................................................ 209fastStrSearch( ) – search by optimally choosing the search algorithm ................................ 210fcntl( ) – perform control functions over open files................................................. 210fdatasync( ) – synchronize a file data ................................................................................. 211fdprintf( ) – write a formatted string to a file descriptor.............................................. 212fileUploadPathClose( ) – close the event-destination file ................................................................... 212fioBaseLibInit( ) – initialize the formatted I/O support library............................................. 213fioFormatV( ) – convert a format string................................................................................. 213

  • VxWorks Kernel API Reference, 6.2

    8

    fioLibInit( ) – initialize the formatted I/O support library................................................. 214fioRdString( ) – read a string from a file.................................................................................... 214fioRead( ) – read a buffer ...................................................................................................... 215floorf( ) – compute largest integer less than or equal to specified value (ANSI)...... 215fmodf( ) – compute the remainder of x/y (ANSI).......................................................... 216formatTrans( ) – format a transaction disk. ................................................................................ 216fpathconf( ) – determine the current value of a configurable limit.................................... 217fppInit( ) – initialize floating-point coprocessor support ............................................... 218fppProbe( ) – probe for the presence of a floating-point coprocessor............................... 218fppRestore( ) – restore the floating-point coprocessor context ............................................. 219fppSave( ) – save the floating-point coprocessor context ................................................. 220fppShowInit( ) – initialize the floating-point show facility ...................................................... 222fppTaskRegsGet( ) – get FPU context for a task................................................................................ 222fppTaskRegsGet( ) – get the floating-point registers from a task TCB.......................................... 223fppTaskRegsSet( ) – set FPU context for a task ................................................................................ 223fppTaskRegsSet( ) – set the floating-point registers of a task ........................................................ 224fppTaskRegsShow( ) – print the contents of a task's floating-point registers .................................. 224free( ) – free a block of memory from the system memory partition (ANSI)......... 225fsEventUtilInit( ) – initialize the file system event utlility library............................................... 225fsMonitorInit( ) – initialize the fsMonitor..................................................................................... 226fsPathAddedEventRaise( ) – raise a "path added" event............................................................................... 226fsPathAddedEventSetup( ) – setup to wait for a path.................................................................................... 227fsWaitForPath( ) – wait for a path ................................................................................................... 227fsmGetDriver( ) – get the XBD name of a mapping based on the path .................................... 228fsmGetVolume( ) – get the pathname based on an XBD name mapping ................................... 228fsmNameInstall( ) – add a mapping between an XBD name and a pathname ........................... 229fsmNameMap( ) – map an XBD name to a Core I/O path.......................................................... 229fsmNameUninstall( ) – remove an XBD name to pathname mapping.............................................. 230fsmProbeInstall( ) – install F/S probe and instantiator functions ................................................ 230fsmProbeUninstall( ) – remove a file system probe ............................................................................. 231fstat( ) – get file status information (POSIX) ................................................................ 231fstatfs( ) – get file status information (POSIX) ................................................................ 232fsync( ) – synchronize a file.............................................................................................. 233ftruncate( ) – truncate a file (POSIX) ..................................................................................... 233g0( ) – return the contents of register g0 (also g1-g7) (SimSolaris)........................ 234getOptServ( ) – parse parameter string into argc, argv format ............................................. 234getcwd( ) – get the current default path (POSIX) ............................................................. 235getenv( ) – get an environment variable (ANSI).............................................................. 235getopt( ) – parse argc/argv argument vector (POSIX)................................................... 236getoptInit( ) – initialize the getopt state structure................................................................. 237getopt_r( ) – parse argc/argv argument vector (POSIX)................................................... 238getwd( ) – get the current default path............................................................................. 240h( ) – display or set the size of shell history............................................................ 240hashFuncIterScale( ) – iterative scaling hashing function for strings ............................................... 241hashFuncModulo( ) – hashing function using remainder technique .............................................. 241

  • Volume 2: Libraries

    9

    hashFuncMultiply( ) – multiplicative hashing function ........................................................................... 242hashKeyCmp( ) – compare keys as 32 bit identifiers ........................................................................ 242hashKeyStrCmp( ) – compare keys based on strings they point to ..................................................... 243hashTblCreate( ) – create a hash table .................................................................................................. 243hashTblDelete( ) – delete a hash table .................................................................................................. 244hashTblDestroy( ) – destroy a hash table................................................................................................ 245hashTblEach( ) – call a routine for each node in a hash table ........................................................ 245hashTblFind( ) – find a hash node that matches the specified key ............................................... 246hashTblInit( ) – initialize a hash table ............................................................................................. 246hashTblPut( ) – put a hash node into the specified hash table .................................................... 247hashTblRemove( ) – remove a hash node from a hash table................................................................ 248hashTblTerminate( ) – terminate a hash table............................................................................................ 248help( ) – print a synopsis of selected routines ................................................................... 249hookAddToHead( ) – add a hook routine at the start of a hook table .................................................. 250hookAddToTail( ) – add a hook routine to the end of a hook table ................................................... 250hookDelete( ) – delete a hook from a hook table ........................................................................... 251hookFind( ) – Search a hook table for a given hook................................................................... 252hookShow( ) – show the hooks in the given hook table.............................................................. 252hrfsAscTime( ) – convert "broken-down" HRFS time to string ..................................................... 253hrfsChkDsk( ) – check the HRFS file system................................................................................... 253hrfsDevCreate( ) – create an HRFS device ........................................................................................... 254hrfsDiskFormat( ) – format a disk with HRFS....................................................................................... 255hrfsFormat( ) – format the HRFS file system via a path............................................................... 255hrfsFormatFd( ) – format the HRFS file system via a file descriptor .............................................. 256hrfsFormatLibInit( ) – prepare to use the HRFS formatter...................................................................... 257hrfsTimeCondense( ) – condense time in HRFS_TM to time in msec....................................................... 257hrfsTimeGet( ) – return # of milliseconds since midnight Jan 1, 1970.......................................... 258hrfsTimeSet( ) – set the # of elapsed milliseconds since midnight Jan 1, 1970 ........................... 258hrfsTimeSplit( ) – split time in msec into HRFS_TM format ............................................................ 259i( ) – print a summary of each task's TCB .................................................................... 259i0( ) – return the contents of register i0 (also i1-i7) (SimSolaris)................................. 260index( ) – find the first occurrence of a character in a string ............................................. 261infinity( ) – return a very large double .................................................................................... 261infinityf( ) – return a very large float......................................................................................... 261inflate( ) – inflate compressed code ........................................................................................ 262intCRGet( ) – read the contents of the cause register (MIPS) ................................................... 262intCRSet( ) – write the contents of the cause register (MIPS).................................................. 263intConnect( ) – connect a C routine to a hardware interrupt...................................................... 263intConnect( ) – connect a C routine to a hardware interrupt...................................................... 266intContext( ) – determine if the current state is in interrupt or task context ........................... 267intCount( ) – get the current interrupt nesting depth............................................................... 267intDisable( ) – disable corresponding interrupt bits (MIPS, PowerPC, ARM) ....................... 267intDisconnect( ) – disconnect a C routine from a hardware interrupt ........................................... 268intEnable( ) – enable corresponding interrupt bits (MIPS, PowerPC, ARM)......................... 269intHandlerCreate( ) – construct interrupt handler for C routine (MC680x0, x86, MIPS, SimSolaris) 269

  • VxWorks Kernel API Reference, 6.2

    10

    intHandlerCreateI86( ) – construct an interrupt handler for C routine (x86)................................................ 270intLevelSet( ) – set interrupt level (MC680x0, x86, ARM, SimSolaris, SimNT and SH).............. 271intLock( ) – lock out interrupts...................................................................................................... 272intLockLevelGet( ) – get interrupt lock-out level (MC680x0, x86, ARM, SH, SimSolaris, SimNT)..... 274intLockLevelSet( ) – set interrupt lock-out level (MC680x0, x86, ARM, SH, SimSolaris, SimNT) ..... 275intSRGet( ) – read the contents of the status register (MIPS) ...................................................... 275intSRSet( ) – update the contents of the status register (MIPS).................................................. 276intStackEnable( ) – enable or disable the interrupt stack usage (x86) .................................................. 276intUninitVecSet( ) – set the uninitialized vector handler (ARM)............................................................ 277intUnlock( ) – cancel interrupt locks................................................................................................. 277intVecBaseGet( ) – get vector (trap) base address (MC680x0, x86, MIPS, ARM, SimSolaris, SimNT) 278intVecBaseSet( ) – set vector (trap) base address (MC680x0, x86, MIPS, ARM, SimSolaris, SimNT) 278intVecGet( ) – get an interrupt vector (MC680x0, x86, MIPS, SH, SimSolaris, SimNT) ............ 279intVecGet2( ) – get a CPU vector, gate type(int/trap), and gate selector (x86)............................ 280intVecSet( ) – set a CPU vector (trap) (MC680x0, x86, MIPS, SH, SimSolaris, SimNT)............ 281intVecSet2( ) – set a CPU vector, gate type(int/trap), and selector (x86)..................................... 285intVecTableWriteProtect( ) – write-protect the exception vector table (MC680x0, x86, ARM, SimSolaris,

    SimNT).......................................................................................................................... 285ioDefPathGet( ) – get the current default path ...................................................................................... 286ioDefPathSet( ) – set the current default path....................................................................................... 287ioGlobalStdGet( ) – get the file descriptor for global input/output/error........................................... 287ioGlobalStdSet( ) – set file descriptor for global input/output/error.................................................. 288ioHelp( ) – print a synopsis of I/O utility functions................................................................. 288ioTaskStdGet( ) – get the file descriptor for task standard input/output/error.............................. 289ioTaskStdSet( ) – set the file descriptor for task standard input/output/error .............................. 289ioctl( ) – perform an I/O control function ............................................................................. 290iosDevAdd( ) – add a device to the kernel I/O system.................................................................... 291iosDevCheck( ) – check for devices with open fd entries .................................................................... 292iosDevClose( ) – close all open fd's for a given device ....................................................................... 292iosDevDelCallback( ) – install the device delete callback function .............................................................. 293iosDevDelete( ) – delete a device from the kernel I/O system........................................................... 293iosDevFind( ) – find an I/O device in the kernel device list............................................................ 294iosDevReplace( ) – replace an existing device in the kernel I/O system............................................. 295iosDevResume( ) – resume a suspended device from the kernel I/O system .................................... 296iosDevShow( ) – display the list of devices in the system.................................................................. 296iosDevSuspend( ) – suspend a device from the kernel I/O system....................................................... 297iosDrvInstall( ) – install a kernel I/O driver......................................................................................... 297iosDrvRemove( ) – remove a kernel I/O driver ...................................................................................... 298iosDrvShow( ) – display a list of system drivers................................................................................. 299iosFdEntryGet( ) – get an unused FD_ENTRY from the pool................................................................. 299iosFdEntryReturn( ) – return an FD_ENTRY to the pool .............................................................................. 300iosFdMaxFiles( ) – return maximum files for current RTP ................................................................... 300iosFdShow( ) – display a list of file descriptor names in the system ............................................. 301iosInit( ) – initialize the kernel I/O system ............................................................................... 301iosRtpFdShow( ) – show the per-RTP fd table ......................................................................................... 302

  • Volume 2: Libraries

    11

    iosShowInit( ) – initialize the I/O system show facility ...................................................... 302irint( ) – convert a double-precision value to an integer ........................................ 303irintf( ) – convert a single-precision value to an integer.......................................... 303iround( ) – round a number to the nearest integer ...................................................... 304iroundf( ) – round a number to the nearest integer ...................................................... 304isatty( ) – return whether the underlying driver is a tty device .............................. 305isrCreate( ) – create an ISR object ....................................................................................... 305isrDelete( ) – delete an ISR object....................................................................................... 306isrIdSelf( ) – get the ISR ID of the currently running ISR.............................................. 307isrInfoGet( ) – get information about an ISR object........................................................... 308isrInvoke( ) – invoke the handler routine of an ISR object.............................................. 309isrShow( ) – show information about an ISR object....................................................... 309kernSysctlInit( ) – initialize the kernel sysctl tree..................................................................... 310kernelInit( ) – initialize the kernel ....................................................................................... 311kernelRoundRobinInstall( ) – install VxWorks Round Robin implementation....................................... 312kernelTimeSlice( ) – enable round-robin selection ...................................................................... 312kernelVersion( ) – return the kernel revision string................................................................. 313kill( ) – send a signal to a task (POSIX) ................................................................... 313l( ) – disassemble and display a specified number of instructions................. 314l0( ) – return the contents of register l0 (also l1-l7) (SimSolaris) ....................... 315ld( ) – load an object module into memory .......................................................... 315ledClose( ) – discard the line-editor ID............................................................................. 317ledControl( ) – change the line-editor ID parameters ........................................................ 317ledOpen( ) – create a new line-editor ID .......................................................................... 318ledRead( ) – read a line with line-editing ........................................................................ 318link( ) – link a file......................................................................................................... 319lio_listio( ) – initiate a list of asynchronous I/O requests (POSIX) .............................. 319lkAddr( ) – list symbols whose values are near a specified value ............................. 320lkup( ) – list symbols .................................................................................................... 321ll( ) – generate a long listing of directory contents............................................. 321llr( ) – do a long listing of directory and all its subdirectories contents........... 322loadModule( ) – load an object module into memory .......................................................... 323loadModuleAt( ) – load an object module into memory .......................................................... 324log10f( ) – compute a base-10 logarithm (ANSI) ........................................................ 328log2( ) – compute a base-2 logarithm........................................................................ 329log2f( ) – compute a base-2 logarithm........................................................................ 329logFdAdd( ) – add a logging file descriptor ....................................................................... 330logFdDelete( ) – delete a logging file descriptor ................................................................... 330logFdSet( ) – set the primary logging file descriptor ...................................................... 331logInit( ) – initialize message logging library .............................................................. 331logMsg( ) – log a formatted error message .................................................................... 332logTask( ) – message-logging support task .................................................................... 333logf( ) – compute a natural logarithm (ANSI)......................................................... 334loginDefaultEncrypt( ) – default password encryption routine ........................................................ 334loginEncryptInstall( ) – install an encryption routine....................................................................... 335

  • VxWorks Kernel API Reference, 6.2

    12

    loginInit( ) – initialize the login table ................................................................................ 336loginPrompt( ) – display a login prompt and validate a user entry .................................... 336loginStringSet( ) – change the login string ................................................................................. 337loginUserAdd( ) – add a user to the login table......................................................................... 337loginUserDelete( ) – delete a user entry from the login table ..................................................... 338loginUserShow( ) – display the user login table.......................................................................... 339loginUserVerify( ) – verify a user name and password in the login table ................................ 339logout( ) – log out of the VxWorks system ................................................................... 340ls( ) – generate a brief listing of a directory.......................................................... 340lseek( ) – set a file read/write pointer......................................................................... 341lsr( ) – list the contents of a directory and any of its subdirectories .................. 342lstAdd( ) – add a node to the end of a list ..................................................................... 342lstConcat( ) – concatenate two lists ..................................................................................... 343lstCount( ) – report the number of nodes in a list ........................................................... 343lstDelete( ) – delete a specified node from a list .............................................................. 344lstExtract( ) – extract a sublist from a list ........................................................................... 344lstFind( ) – find a node in a list........................................................................................ 345lstFirst( ) – find first node in list...................................................................................... 345lstFree( ) – free up a list .................................................................................................... 346lstGet( ) – delete and return the first node from a list................................................ 346lstInit( ) – initialize a list descriptor .............................................................................. 347lstInsert( ) – insert a node in a list after a specified node .............................................. 347lstLast( ) – find the last node in a list ............................................................................. 348lstNStep( ) – find a list node nStep steps away from a specified node ......................... 348lstNext( ) – find the next node in a list............................................................................ 349lstNth( ) – find the Nth node in a list ............................................................................ 349lstPrevious( ) – find the previous node in a list.................................................................... 350m( ) – modify memory............................................................................................. 350mRegs( ) – modify registers............................................................................................. 351mach( ) – return contents of system register mach (also macl, pr) (SH) ................ 352malloc( ) – allocate block of memory from system memory partition (ANSI) ........ 352memAddToPool( ) – add memory to the system memory partition .......................................... 353memDevCreate( ) – create a memory device................................................................................ 353memDevCreateDir( ) – create a memory device for multiple files ................................................. 355memDevDelete( ) – delete a memory device................................................................................ 355memDrv( ) – install a memory driver ................................................................................ 356memEdrBlockMark( ) – mark or unmark selected blocks ................................................................. 356memEdrBlockShow( ) – print memory block information ................................................................ 357memEdrFreeQueueFlush( ) – flush the free queue....................................................................................... 358memEdrPartShow( ) – show partition information in the kernel................................................... 358memEdrRtpBlockMark( ) – mark or unmark selected allocated blocks in an RTP.............................. 359memEdrRtpBlockShow( ) – print memory block information of an RTP.............................................. 359memEdrRtpPartShow( ) – show partition information of an RTP ....................................................... 360memFindMax( ) – find largest free block in system memory partition (kernel heap)......... 361memInfoGet( ) – get heap information..................................................................................... 361

  • Volume 2: Libraries

    13

    memOptionsGet( ) – get the options of the system memory partition (kernel heap) .......... 362memOptionsSet( ) – set the options for the system memory partition (kernel heap) ......... 362memPartAddToPool( ) – add memory to a memory partition ....................................................... 363memPartAlignedAlloc( ) – allocate aligned memory from a partition ............................................. 364memPartAlloc( ) – allocate a block of memory from a partition ......................................... 364memPartCreate( ) – create a memory partition ........................................................................ 365memPartDelete( ) – delete a partition and free associated memory ..................................... 366memPartFindMax( ) – find the size of the largest available free block ..................................... 366memPartFree( ) – free a block of memory in a partition ..................................................... 367memPartInfoGet( ) – get partition information .......................................................................... 368memPartOptionsGet( ) – get the options of a memory partition.................................................... 368memPartOptionsSet( ) – set the options for a memory partition................................................... 369memPartRealloc( ) – reallocate a block of memory in a specified partition .......................... 369memPartShow( ) – show blocks and statistics for a given memory partition.................... 370memPartSmCreate( ) – create a shared memory partition (VxMP) ............................................ 371memShow( ) – show blocks and statistics for the current heap partition.................... 372memShowInit( ) – initialize the memory partition show facility ........................................ 375memalign( ) – allocate aligned memory from system memory partition (kernel heap) 375mkdir( ) – make a directory ........................................................................................ 376mlock( ) – lock specified pages into memory (POSIX) ........................................... 376mlockall( ) – lock all pages used by a process into memory (POSIX)....................... 377mmuMipsInitialMemoryMap( ) – dummy function........................................................................................ 377mmuMipsTlbVec( ) – dummy function ........................................................................................ 378mmuMipsXTlbVec( ) – dummy function ........................................................................................ 378mmuPhysToVirt( ) – translate a physical address to a virtual address (ARM)..................... 378mmuPro32LibInit( ) – initialize module ........................................................................................ 379mmuPro32Page0UnMap( ) – unmap the page zero for NULL pointer detection ................................ 380mmuPro32Show( ) – Dump the page directory and page table entry for a given ................ 380mmuPro36LibInit( ) – initialize module ........................................................................................ 381mmuPro36Page0UnMap( ) – unmap the page zero for NULL pointer detection ................................ 381mmuPro36PageMap( ) – map 36bit physical memory page to virtual memory page ................ 382mmuPro36Show( ) – Dump the page directory and page table entry for a given ................ 382mmuPro36Translate( ) – translate a virtual address to a 36bit physical address ........................ 383mmuShLibInit( ) – Initialize the SH MMU library................................................................. 383mmuVirtToPhys( ) – translate a virtual address to a physical address (ARM)..................... 384moduleCheck( ) – verify checksums on all modules loaded in the system ...................... 384moduleCreate( ) – create and initialize a module.................................................................. 385moduleCreateHookAdd( ) – add a routine to be called when a module is added ............................ 386moduleCreateHookDelete( ) – delete a previously added module create hook routine ...................... 387moduleDelete( ) – delete module ID information ................................................................. 387moduleFindByGroup( ) – find a module by group number............................................................. 388moduleFindByName( ) – find a module by name............................................................................. 388moduleFindByNameAndPath( ) – find a module by filename and path ...................................................... 389moduleFlagsGet( ) – get the flags associated with a module ID ............................................. 389moduleIdListGet( ) – get a list of loaded modules ..................................................................... 390

  • VxWorks Kernel API Reference, 6.2

    14

    moduleInfoGet( ) – get information about an object module .......................................................... 390moduleNameGet( ) – get the name associated with a module ID ...................................................... 391moduleSegFirst( ) – find the first segment in a module .................................................................... 392moduleSegGet( ) – get (delete and return) the first segment from a module............................... 392moduleSegNext( ) – find the next segment in a module.................................................................... 393moduleShow( ) – show information about loaded modules ........................................................ 393mqPxDescObjIdGet( ) – returns the OBJ_ID associated with a mqd_t descriptor ................................ 394mqPxLibInit( ) – initialize the POSIX message queue library..................................................... 395mqPxShowInit( ) – initialize the POSIX message queue show facility .......................................... 395mq_close( ) – close a message queue (POSIX) ......................................................................... 396mq_getattr( ) – get message queue attributes (POSIX).............................................................. 396mq_notify( ) – notify a task that a message is available on a queue (POSIX) ....................... 397mq_open( ) – open a message queue (POSIX) ......................................................................... 398mq_receive( ) – receive a message from a message queue (POSIX)......................................... 400mq_send( ) – send a message to a message queue (POSIX) .................................................. 401mq_setattr( ) – set message queue attributes (POSIX) .............................................................. 402mq_unlink( ) – remove a message queue (POSIX)..................................................................... 403msgQClose( ) – close a named message queue ........................................................................... 403msgQCreate( ) – create and initialize a message queue............................................................... 404msgQDelete( ) – delete a message queue....................................................................................... 405msgQEvStart( ) – start the event notification process for a message queue............................... 406msgQEvStop( ) – stop the event notification process for a message queue............................... 407msgQInfoGet( ) – get information about a message queue........................................................... 408msgQInitialize( ) – initialize a pre-allocated message queue.......................................................... 410msgQNumMsgs( ) – get the number of messages queued to a message queue ............................. 411msgQOpen( ) – open a message queue ........................................................................................ 412msgQOpenInit( ) – initialize the message queue open facility ....................................................... 413msgQReceive( ) – receive a message from a message queue ........................................................ 414msgQSend( ) – send a message to a message queue ................................................................. 415msgQShow( ) – show information about a message queue....................................................... 417msgQShowInit( ) – initialize the message queue show facility....................................................... 418msgQSmCreate( ) – create and initialize a shared memory message queue (VxMP) ................... 418msgQUnlink( ) – unlink a named message queue ........................................................................ 419munlock( ) – unlock specified pages (POSIX)......................................................................... 420munlockall( ) – unlock all pages used by a process (POSIX) .................................................... 421mv( ) – mv file into other directory. ............................................................................... 421nanosleep( ) – suspend the current task until the time interval elapses (POSIX) ................ 422netHelp( ) – print a synopsis of network routines ................................................................ 422npc( ) – return the contents of the next program counter (SimSolaris)...................... 423o0( ) – return the contents of register o0 (also o1-o7) (SimSolaris) ........................... 424objClassTypeGet( ) – get an object's class type ..................................................................................... 424objContextGet( ) – return the object's context value ........................................................................ 425objContextSet( ) – set the object's context value .............................................................................. 425objHandleShow( ) – show information on the object referenced by an object handle .................. 426objHandleTblShow( ) – show information on an RTP's handle table.................................................... 426

  • Volume 2: Libraries

    15

    objNameGet( ) – get an object's name......................................................................................... 427objNameLenGet( ) – get an object's name length............................................................................. 428objNameToId( ) – find object with matching name string and type ........................................ 428objOwnerGet( ) – return the object's owner................................................................................. 429objOwnerSet( ) – change the object's owner ............................................................................... 430objShow( ) – show information on an object....................................................................... 431objShowAll( ) – show all information on an object ................................................................. 431open( ) – open a file .......................................................................................................... 433opendir( ) – open a directory for searching (POSIX) ........................................................ 435operator_delete( ) – default run-time support for memory deallocation (C++) ........................ 436operator_new( ) – default run-time support for operator new (C++) ...................................... 436operator_new( ) – default run-time support for operator new (nothrow) (C++) ................... 437operator_new( ) – run-time support for operator new with placement (C++) ....................... 437oprintf( ) – write a formatted string to an output function............................................ 438partLibCreate( ) – partition a device ............................................................................................. 438passFsDevInit( ) – associate a device with passFs file system functions.................................. 439passFsInit( ) – prepare to use the passFs library................................................................... 439pathconf( ) – determine the current value of a configurable limit ................................... 440pause( ) – suspend the task until delivery of a signal (POSIX) ................................... 440pc( ) – return the contents of the program counter................................................. 441pentiumBtc( ) – execute atomic compare-and-exchange instruction to clear a bit ............. 441pentiumBts( ) – execute atomic compare-and-exchange instruction to set a bit ................ 442pentiumCr4Get( ) – get contents of CR4 register............................................................................ 442pentiumCr4Set( ) – sets specified value to the CR4 register ........................................................ 442pentiumMcaEnable( ) – enable/disable the MCA (Machine Check Architecture) .......................... 443pentiumMcaShow( ) – show MCA (Machine Check Architecture) registers.................................. 443pentiumMsrGet( ) – get the contents of the specified MSR (Model Specific Register).............. 444pentiumMsrInit( ) – initialize all the MSRs (Model Specific Register)......................................... 444pentiumMsrSet( ) – set a value to the specified MSR (Model Specific Registers) ..................... 445pentiumMsrShow( ) – show all the MSR (Model Specific Register) ................................................ 445pentiumMtrrDisable( ) – disable MTRR (Memory Type Range Register)........................................... 445pentiumMtrrEnable( ) – enable MTRR (Memory Type Range Register)............................................ 446pentiumMtrrGet( ) – get MTRRs to a specified MTRR table .......................................................... 446pentiumMtrrSet( ) – set MTRRs from specified MTRR table with WRMSR instruction............ 447pentiumP5PmcGet( ) – get the contents of P5 PMC0 and PMC1....................................................... 447pentiumP5PmcGet0( ) – get the contents of P5 PMC0........................................................................... 448pentiumP5PmcGet1( ) – get the contents of P5 PMC1........................................................................... 448pentiumP5PmcReset( ) – reset both PMC0 and PMC1 ........................................................................... 448pentiumP5PmcReset0( ) – reset PMC0........................................................................................................ 449pentiumP5PmcReset1( ) – reset PMC1........................................................................................................ 449pentiumP5PmcStart0( ) – start PMC0 ........................................................................................................ 450pentiumP5PmcStart1( ) – start PMC1 ........................................................................................................ 450pentiumP5PmcStop( ) – stop both P5 PMC0 and PMC1....................................................................... 451pentiumP5PmcStop0( ) – stop P5 PMC0 ................................................................................................... 451pentiumP5PmcStop1( ) – stop P5 PMC1 ................................................................................................... 451

  • VxWorks Kernel API Reference, 6.2

    16

    pentiumP6PmcGet( ) – get the contents of PMC0 and PMC1.......................................................... 452pentiumP6PmcGet0( ) – get the contents of PMC0 ............................................................................. 452pentiumP6PmcGet1( ) – get the contents of PMC1 ............................................................................. 453pentiumP6PmcReset( ) – reset both PMC0 and PMC1......................................................................... 453pentiumP6PmcReset0( ) – reset PMC0 ..................................................................................................... 453pentiumP6PmcReset1( ) – reset PMC1 ..................................................................................................... 454pentiumP6PmcStart( ) – start both PMC0 and PMC1 ......................................................................... 454pentiumP6PmcStop( ) – stop both PMC0 and PMC1 ......................................................................... 455pentiumP6PmcStop1( ) – stop PMC1 ...................................................................................................... 455pentiumPmcGet( ) – get the contents of PMC0 and PMC1.......................................................... 455pentiumPmcGet0( ) – get the contents of PMC0 ............................................................................. 456pentiumPmcGet1( ) – get the contents of PMC1 ............................................................................. 456pentiumPmcReset( ) – reset both PMC0 and PMC1......................................................................... 457pentiumPmcReset0( ) – reset PMC0 ..................................................................................................... 457pentiumPmcReset1( ) – reset PMC1 ..................................................................................................... 457pentiumPmcShow( ) – show PMCs (Performance Monitoring Counters).................................... 458pentiumPmcStart( ) – start both PMC0 and PMC1 ......................................................................... 458pentiumPmcStart0( ) – start PMC0...................................................................................................... 459pentiumPmcStart1( ) – start PMC1...................................................................................................... 459pentiumPmcStop( ) – stop both PMC0 and PMC1 ......................................................................... 460pentiumPmcStop0( ) – stop PMC0 ...................................................................................................... 460pentiumPmcStop1( ) – stop PMC1 ...................................................................................................... 460pentiumSerialize( ) – execute a serializing instruction CPUID .................................................... 461pentiumTlbFlush( ) – flush TLBs (Translation Lookaside Buffers) .............................................. 461pentiumTscGet32( ) – get the lower half of the 64Bit TSC (Timestamp Counter) ...................... 462pentiumTscGet64( ) – get 64Bit TSC (Timestamp Counter)........................................................... 462pentiumTscReset( ) – reset the TSC (Timestamp Counter) ........................................................... 462period( ) – spawn a task to call a function periodically .............................................. 463periodRun( ) – call a function periodically........................................................................... 464pipeDevCreate( ) – create a pipe device ....................................................................................... 464pipeDevDelete( ) – delete a pipe device....................................................................................... 465pipeDrv( ) – initialize the pipe driver ............................................................................... 466pmFreeSpace( ) – returns the amount of free space left in the PM arena............................. 466pmInvalidate( ) – invalidates the entire PM arena................................................................... 467pmRegionAddr( ) – returns the address of a persistent heap region........................................ 467pmRegionClose( ) – closes a region making it inaccessible to clients ....................................... 468pmRegionCreate( ) – creates a persistent heap region .................................................................. 468pmRegionOpen( ) – opens an existing persistent heap region................................................... 469pmRegionProtect( ) – makes a PM region read-only...................................................................... 469pmRegionSize( ) – return the size of a persistent heap region ................................................ 470pmShow( ) – shows the created persistent heap segments............................................. 470pmValidate( ) – validates a PM arena..................................................................................... 471poolBlockAdd( ) – add an item block to the pool ...................................................................... 471poolCreate( ) – create a pool ................................................................................................... 472poolDelete( ) – delete a pool ................................................................................................... 473

  • Volume 2: Libraries

    17

    poolFreeCount( ) – return number of free items in pool........................................................ 474poolIncrementGet( ) – get the increment value used to grow the pool..................................... 474poolIncrementSet( ) – set the increment value used to grow the pool ..................................... 475poolItemGet( ) – get next free item from pool and return a pointer to it ........................ 475poolItemReturn( ) – return an item to the pool......................................................................... 476poolShow( ) – display pool information.......................................................................... 477poolTotalCount( ) – return total number of items in pool ...................................................... 478poolUnusedBlocksFree( ) – free blocks that have all items unused ................................................... 478powf( ) – compute the value of a number raised to a specified power (ANSI). 479printErr( ) – write a formatted string to the standard error stream ......................... 479printErrno( ) – print the definition of a specified error status value ............................ 480printLogo( ) – print the VxWorks logo ............................................................................ 480printf( ) – write a formatted string to the standard output stream (ANSI) ........ 481proofUtf8( ) – Determine if a string represents a valid UTF-8 character.................... 484proofUtf8String( ) – determine if a string is valid UTF-8 ........................................................ 485psr( ) – return the contents of the processor status register (SimSolaris) ....... 485psrShow( ) – display the meaning of a specified PSR value, symbolically (ARM). 486pthreadLibInit( ) – initialize POSIX threads support............................................................. 486pthread_attr_destroy( ) – destroy a thread attributes object (POSIX) ............................................ 487pthread_attr_getdetachstate( ) – get detachstate attribute value from thread attributes object (POSIX) 487pthread_attr_getinheritsched( ) – get inheritsched attribute value from thread attributes object (POSIX) 488pthread_attr_getname( ) – get name of thread attribute object ......................................................... 488pthread_attr_getopt( ) – get options from thread attribute object................................................. 489pthread_attr_getschedparam( ) – get schedparam attribute value from thread attributes object (POSIX) 489pthread_attr_getschedpolicy( ) – get schedpolicy attribute from thread attributes object (POSIX)........ 490pthread_attr_getscope( ) – get contention scope from thread attributes (POSIX) .......................... 490pthread_attr_getstackaddr( ) – get value of stackaddr attribute from thread attributes object (POSIX) 491pthread_attr_getstacksize( ) – get stacksize attribute value from thread attributes object (POSIX) .. 491pthread_attr_init( ) – initialize thread attributes object (POSIX) ............................................. 492pthread_attr_setdetachstate( ) – set detachstate attribute in thread attributes object (POSIX) .............. 493pthread_attr_setinheritsched( ) – set inheritsched attribute in thread attribut