This is locks.h in view mode; [Download] [Up]
/*
* -- FILE: locks.h
* AUTHOR: Michael T. Peterson
*
* Copyright (C) 1994, by Michael T. Peterson
* All rights reserved.
*
* Permission is granted for noncommercial, private use of this software.
* You are expressely prohibited from selling this software, distributing
* this software with (or within) another product, or removing this notice.
*/
#ifndef _locks_
#define _locks_
#ifdef __cplusplus
extern "C" {
#endif
#include <pthread.h>
/*
* -- Forward declarations used as opaque types.
*/
typedef struct SHARED_LOCK *pthread_rwlock_t;
typedef struct PRIO_LOCK *pthread_priolock_t;
/*-------------------------------------------------------------------------*/
/* SHARED AND EXLUSIVE LOCKING PRIMITIVES */
/*-------------------------------------------------------------------------*/
extern int
pthread_rw_init_np( pthread_rwlock_t *shared );
extern int
pthread_rw_destroy_np( pthread_rwlock_t *shared );
extern int
pthread_rw_lock_shared_np( const pthread_rwlock_t *shared );
extern int
pthread_rw_unlock_shared_np( const pthread_rwlock_t *shared );
extern int
pthread_rw_lock_exclusive_np( const pthread_rwlock_t *shared );
extern int
pthread_rw_unlock_exclusive_np( const pthread_rwlock_t *shared );
/*-------------------------------------------------------------------------*/
/* PRIORITY INHERITANCE LOCKS */
/*-------------------------------------------------------------------------*/
extern int
pthread_priolock_init_np( pthread_priolock_t *prio_lock );
extern int
pthread_priolock_destroy_np( pthread_priolock_t *prio_lock );
extern int
pthread_priolock_lock_np( const pthread_priolock_t *prio_lock );
extern int
pthread_priolock_unlock_np( const pthread_priolock_t *prio_lock );
#ifdef __cplusplus
}
#endif
#endif
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.