Changeset a770666670c0036387c484fd9dc90622817cb34b

Show
Ignore:
Timestamp:
08/14/08 20:30:42 (6 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1218745842 +0000
git-parent:

[cd619ccad0c2b218633aea53ca423938fff261e3]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1218745842 +0000
Message:

take the docs out of the CPP #ifdef, refs #39

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/utils/noit_sem.h

    rcd619cc ra770666  
    3434#define _UTILS_NOIT_SEM_H 
    3535 
     36/*! \fn int noit_sem_init(noit_sem_t *s, int unused, int value) 
     37    \brief initializes a counting semaphore for first time use. 
     38    \param s the semaphore to be initialized 
     39    \param unused is unused (keeps API combatibility with sem_init() 
     40    \param value sets the initial value of the semaphore 
     41    \return 0 on success or -1 on failure 
     42 */ 
     43/*! \fn int noit_sem_wait(noit_sem_t *s) 
     44    \brief decrements the value of the semaphore waiting if required. 
     45    \param s the semaphore on which to wait 
     46    \return 0 on success or -1 on failure 
     47 */ 
     48/*! \fn int noit_sem_post(noit_sem_t *s) 
     49    \brief increments the value of the semaphore releasing any waiters. 
     50    \param s the semaphore on which to wait 
     51    \return 0 on success or -1 on failure 
     52 */ 
     53/*! \fn int noit_sem_trywait(noit_sem_t *s) 
     54    \brief decrements the value of the semaphore if greater than 0 or fails 
     55    \param s the semaphore on which to wait 
     56    \return 0 on success or -1 on failure 
     57 */ 
     58/*! \fn int noit_sem_getvalue(noit_sem_t *s, int *value) 
     59    \brief retrieves the current value of a semaphore, placing it in *value 
     60    \param s the semaphore on which to operate 
     61    \param value a pointer an integer that will be populated with the current value of the semaphore 
     62    \return 0 on success or -1 on failure 
     63 */ 
     64/*! \fn int noit_sem_destroy(noit_sem_t *s) 
     65    \brief releases all resources related to a semaphore 
     66    \param s the semaphore to destroy 
     67    \return 0 on success or -1 on failure 
     68 */ 
    3669#ifdef BROKEN_SEM_INIT 
    3770 
     
    4477} noit_sem_t; 
    4578 
    46 /*! \fn int noit_sem_init(noit_sem_t *s, int unused, int value) 
    47     \brief initializes a counting semaphore for first time use. 
    48     \param s the semaphore to be initialized 
    49     \param unused is unused (keeps API combatibility with sem_init() 
    50     \param value sets the initial value of the semaphore 
    51     \return 0 on success or -1 on failure 
    52  */ 
    5379API_EXPORT(int)  noit_sem_init(noit_sem_t *, int, int); 
    54 /*! \fn int noit_sem_wait(noit_sem_t *s) 
    55     \brief decrements the value of the semaphore waiting if required. 
    56     \param s the semaphore on which to wait 
    57     \return 0 on success or -1 on failure 
    58  */ 
    5980API_EXPORT(int)  noit_sem_wait(noit_sem_t *); 
    60 /*! \fn int noit_sem_post(noit_sem_t *s) 
    61     \brief increments the value of the semaphore releasing any waiters. 
    62     \param s the semaphore on which to wait 
    63     \return 0 on success or -1 on failure 
    64  */ 
    6581API_EXPORT(void) noit_sem_post(noit_sem_t *); 
    66 /*! \fn int noit_sem_trywait(noit_sem_t *s) 
    67     \brief decrements the value of the semaphore if greater than 0 or fails 
    68     \param s the semaphore on which to wait 
    69     \return 0 on success or -1 on failure 
    70  */ 
    7182API_EXPORT(int)  noit_sem_trywait(noit_sem_t *); 
    72 /*! \fn int noit_sem_getvalue(noit_sem_t *s, int *value) 
    73     \brief retrieves the current value of a semaphore, placing it in *value 
    74     \param s the semaphore on which to operate 
    75     \param value a pointer an integer that will be populated with the current value of the semaphore 
    76     \return 0 on success or -1 on failure 
    77  */ 
    7883API_EXPORT(int)  noit_sem_getvalue(noit_sem_t *, int *); 
    79 /*! \fn int noit_sem_destroy(noit_sem_t *s) 
    80     \brief releases all resources related to a semaphore 
    81     \param s the semaphore to destroy 
    82     \return 0 on success or -1 on failure 
    83  */ 
    8484API_EXPORT(void) noit_sem_destroy(noit_sem_t *); 
    8585