VirtualBox

Changeset 25717 in vbox for trunk/include


Ignore:
Timestamp:
Jan 11, 2010 1:24:09 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
56457
Message:

iprt: Added RTSemEventCreateEx and did some cleanups of the RTSemEventDestroy behavior wrt NIL handles.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/semaphore.h

    r25711 r25717  
    6262 *
    6363 * @returns iprt status code.
    64  * @param   pEventSem    Where to store the event semaphore handle.
    65  */
    66 RTDECL(int)  RTSemEventCreate(PRTSEMEVENT pEventSem);
     64 * @param   phEventSem          Where to store the handle to the newly created
     65 *                              event semaphore.
     66 */
     67RTDECL(int)  RTSemEventCreate(PRTSEMEVENT phEventSem);
     68
     69/**
     70 * Creates a read/write semaphore.
     71 *
     72 * @returns iprt status code.
     73 * @param   phEventSem          Where to store the handle to the newly created
     74 *                              event semaphore.
     75 * @param   fFlags              Flags, any combination of the
     76 *                              RTSEMEVENT_FLAGS_XXX \#defines.
     77 * @param   hClass              The class (no reference consumed).  Since we
     78 *                              don't do order checks on event semaphores, the
     79 *                              use of the class is limited to controlling the
     80 *                              timeout threshold for deadlock detection.
     81 * @param   pszNameFmt          Name format string for the lock validator,
     82 *                              optional (NULL).  Max length is 32 bytes.
     83 * @param   ...                 Format string arguments.
     84 */
     85RTDECL(int)  RTSemEventCreateEx(PRTSEMEVENT phEventSem, uint32_t fFlags, RTLOCKVALCLASS hClass, const char *pszNameFmt, ...);
     86
     87/** @name RTSemMutexCreateEx flags
     88 * @{ */
     89/** Disables lock validation. */
     90#define RTSEMEVENT_FLAGS_NO_LOCK_VAL    UINT32_C(0x00000001)
     91/** @} */
     92
    6793
    6894/**
     
    7096 *
    7197 * @returns iprt status code.
    72  * @param   EventSem    Handle of the
    73  */
    74 RTDECL(int)  RTSemEventDestroy(RTSEMEVENT EventSem);
     98 * @param   hEventSem           Handle of the event sempahore.  NIL_RTSEMEVENT
     99 *                              is quitely ignored (VINF_SUCCESS).
     100 */
     101RTDECL(int)  RTSemEventDestroy(RTSEMEVENT hEventSem);
    75102
    76103/**
     
    82109 *
    83110 * @returns iprt status code.
    84  * @param   EventSem    The event semaphore to signal.
    85  */
    86 RTDECL(int)  RTSemEventSignal(RTSEMEVENT EventSem);
     111 * @param   hEventSem           The event semaphore to signal.
     112 */
     113RTDECL(int)  RTSemEventSignal(RTSEMEVENT hEventSem);
    87114
    88115/**
     
    94121 * @returns iprt status code.
    95122 *          Will not return VERR_INTERRUPTED.
    96  * @param   EventSem    The event semaphore to wait on.
    97  * @param   cMillies    Number of milliseconds to wait.
    98  */
    99 RTDECL(int)  RTSemEventWait(RTSEMEVENT EventSem, unsigned cMillies);
     123 * @param   hEventSem           The event semaphore to wait on.
     124 * @param   cMillies            Number of milliseconds to wait.
     125 */
     126RTDECL(int)  RTSemEventWait(RTSEMEVENT hEventSem, unsigned cMillies);
    100127
    101128/**
     
    105132 *
    106133 * @returns iprt status code.
    107  * @param   EventSem    The event semaphore to wait on.
    108  * @param   cMillies    Number of milliseconds to wait.
    109  */
    110 RTDECL(int)  RTSemEventWaitNoResume(RTSEMEVENT EventSem, unsigned cMillies);
     134 * @param   hEventSem           The event semaphore to wait on.
     135 * @param   cMillies            Number of milliseconds to wait.
     136 */
     137RTDECL(int)  RTSemEventWaitNoResume(RTSEMEVENT hEventSem, unsigned cMillies);
    111138
    112139/**
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette