Ignore:
Timestamp:
Dec 30, 2005 11:50:15 PM (18 years ago)
Author:
bennylp
Message:

Basic module, transport, and sending messages

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/include/pj/os.h

    r70 r106  
    505505 * @} 
    506506 */ 
     507 
     508/////////////////////////////////////////////////////////////////////////////// 
     509/** 
     510 * @defgroup PJ_RW_MUTEX Reader/Writer Mutex 
     511 * @ingroup PJ_OS 
     512 * @{ 
     513 * Reader/writer mutex is a classic synchronization object where multiple 
     514 * readers can acquire the mutex, but only a single writer can acquire the  
     515 * mutex. 
     516 */ 
     517typedef struct pj_rwmutex_t pj_rwmutex_t; 
     518 
     519/** 
     520 * Create reader/writer mutex. 
     521 * 
     522 * @param pool      Pool to allocate memory for the mutex. 
     523 * @param name      Name to be assigned to the mutex. 
     524 * @param mutex     Pointer to receive the newly created mutex. 
     525 * 
     526 * @return          PJ_SUCCESS on success, or the error code. 
     527 */ 
     528PJ_DECL(pj_status_t) pj_rwmutex_create(pj_pool_t *pool, const char *name, 
     529                                       pj_rwmutex_t **mutex); 
     530 
     531/** 
     532 * Lock the mutex for reading. 
     533 * 
     534 * @param mutex     The mutex. 
     535 * @return          PJ_SUCCESS on success, or the error code. 
     536 */ 
     537PJ_DECL(pj_status_t) pj_rwmutex_lock_read(pj_rwmutex_t *mutex); 
     538 
     539/** 
     540 * Lock the mutex for writing. 
     541 * 
     542 * @param mutex     The mutex. 
     543 * @return          PJ_SUCCESS on success, or the error code. 
     544 */ 
     545PJ_DECL(pj_status_t) pj_rwmutex_lock_write(pj_rwmutex_t *mutex); 
     546 
     547/** 
     548 * Release read lock. 
     549 * 
     550 * @param mutex     The mutex. 
     551 * @return          PJ_SUCCESS on success, or the error code. 
     552 */ 
     553PJ_DECL(pj_status_t) pj_rwmutex_unlock_read(pj_rwmutex_t *mutex); 
     554 
     555/** 
     556 * Release write lock. 
     557 * 
     558 * @param mutex     The mutex. 
     559 * @return          PJ_SUCCESS on success, or the error code. 
     560 */ 
     561PJ_DECL(pj_status_t) pj_rwmutex_unlock_write(pj_rwmutex_t *mutex); 
     562 
     563/** 
     564 * Destroy reader/writer mutex. 
     565 * 
     566 * @param mutex     The mutex. 
     567 * @return          PJ_SUCCESS on success, or the error code. 
     568 */ 
     569PJ_DECL(pj_status_t) pj_rwmutex_destroy(pj_rwmutex_t *mutex); 
     570 
     571 
     572/** 
     573 * @} 
     574 */ 
     575 
    507576 
    508577/////////////////////////////////////////////////////////////////////////////// 
Note: See TracChangeset for help on using the changeset viewer.