From 063a19a2909c7a3d31c2af410d01e3fd6f0100c6 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 15 Dec 1998 00:24:30 +0000 Subject: Moved around per Ralf Corsepius as preparation for automake --- c/src/exec/posix/base/Makefile.in | 34 --- c/src/exec/posix/base/aio.h | 137 --------- c/src/exec/posix/base/devctl.h | 30 -- c/src/exec/posix/base/intr.h | 72 ----- c/src/exec/posix/base/limits.h | 164 ----------- c/src/exec/posix/base/mqueue.h | 145 ---------- c/src/exec/posix/base/pthread.h | 500 --------------------------------- c/src/exec/posix/base/sched.h | 88 ------ c/src/exec/posix/base/semaphore.h | 108 ------- c/src/exec/posix/base/unistd.h | 89 ------ c/src/exec/posix/headers/Makefile.in | 38 --- c/src/exec/posix/headers/cancel.h | 16 -- c/src/exec/posix/headers/cond.h | 132 --------- c/src/exec/posix/headers/condmp.h | 162 ----------- c/src/exec/posix/headers/config.h | 59 ---- c/src/exec/posix/headers/intr.h | 154 ---------- c/src/exec/posix/headers/key.h | 136 --------- c/src/exec/posix/headers/mqueue.h | 188 ------------- c/src/exec/posix/headers/mqueuemp.h | 161 ----------- c/src/exec/posix/headers/mutex.h | 122 -------- c/src/exec/posix/headers/mutexmp.h | 161 ----------- c/src/exec/posix/headers/posixapi.h | 34 --- c/src/exec/posix/headers/priority.h | 44 --- c/src/exec/posix/headers/psignal.h | 22 -- c/src/exec/posix/headers/pthread.h | 125 --------- c/src/exec/posix/headers/pthreadmp.h | 161 ----------- c/src/exec/posix/headers/semaphore.h | 137 --------- c/src/exec/posix/headers/semaphoremp.h | 161 ----------- c/src/exec/posix/headers/seterr.h | 20 -- c/src/exec/posix/headers/threadsup.h | 46 --- c/src/exec/posix/headers/time.h | 50 ---- c/src/exec/posix/inline/Makefile.in | 31 -- c/src/exec/posix/inline/cond.inl | 77 ----- c/src/exec/posix/inline/intr.inl | 72 ----- c/src/exec/posix/inline/key.inl | 70 ----- c/src/exec/posix/inline/mqueue.inl | 83 ------ c/src/exec/posix/inline/mutex.inl | 93 ------ c/src/exec/posix/inline/priority.inl | 37 --- c/src/exec/posix/inline/pthread.inl | 70 ----- c/src/exec/posix/inline/semaphore.inl | 71 ----- c/src/exec/posix/macros/Makefile.in | 32 --- c/src/exec/posix/sys/Makefile.in | 31 -- c/src/exec/posix/sys/ioctl.h | 17 -- c/src/exec/posix/sys/utime.h | 25 -- c/src/exec/posix/sys/utsname.h | 49 ---- 45 files changed, 4254 deletions(-) delete mode 100644 c/src/exec/posix/base/Makefile.in delete mode 100644 c/src/exec/posix/base/aio.h delete mode 100644 c/src/exec/posix/base/devctl.h delete mode 100644 c/src/exec/posix/base/intr.h delete mode 100644 c/src/exec/posix/base/limits.h delete mode 100644 c/src/exec/posix/base/mqueue.h delete mode 100644 c/src/exec/posix/base/pthread.h delete mode 100644 c/src/exec/posix/base/sched.h delete mode 100644 c/src/exec/posix/base/semaphore.h delete mode 100644 c/src/exec/posix/base/unistd.h delete mode 100644 c/src/exec/posix/headers/Makefile.in delete mode 100644 c/src/exec/posix/headers/cancel.h delete mode 100644 c/src/exec/posix/headers/cond.h delete mode 100644 c/src/exec/posix/headers/condmp.h delete mode 100644 c/src/exec/posix/headers/config.h delete mode 100644 c/src/exec/posix/headers/intr.h delete mode 100644 c/src/exec/posix/headers/key.h delete mode 100644 c/src/exec/posix/headers/mqueue.h delete mode 100644 c/src/exec/posix/headers/mqueuemp.h delete mode 100644 c/src/exec/posix/headers/mutex.h delete mode 100644 c/src/exec/posix/headers/mutexmp.h delete mode 100644 c/src/exec/posix/headers/posixapi.h delete mode 100644 c/src/exec/posix/headers/priority.h delete mode 100644 c/src/exec/posix/headers/psignal.h delete mode 100644 c/src/exec/posix/headers/pthread.h delete mode 100644 c/src/exec/posix/headers/pthreadmp.h delete mode 100644 c/src/exec/posix/headers/semaphore.h delete mode 100644 c/src/exec/posix/headers/semaphoremp.h delete mode 100644 c/src/exec/posix/headers/seterr.h delete mode 100644 c/src/exec/posix/headers/threadsup.h delete mode 100644 c/src/exec/posix/headers/time.h delete mode 100644 c/src/exec/posix/inline/Makefile.in delete mode 100644 c/src/exec/posix/inline/cond.inl delete mode 100644 c/src/exec/posix/inline/intr.inl delete mode 100644 c/src/exec/posix/inline/key.inl delete mode 100644 c/src/exec/posix/inline/mqueue.inl delete mode 100644 c/src/exec/posix/inline/mutex.inl delete mode 100644 c/src/exec/posix/inline/priority.inl delete mode 100644 c/src/exec/posix/inline/pthread.inl delete mode 100644 c/src/exec/posix/inline/semaphore.inl delete mode 100644 c/src/exec/posix/macros/Makefile.in delete mode 100644 c/src/exec/posix/sys/Makefile.in delete mode 100644 c/src/exec/posix/sys/ioctl.h delete mode 100644 c/src/exec/posix/sys/utime.h delete mode 100644 c/src/exec/posix/sys/utsname.h diff --git a/c/src/exec/posix/base/Makefile.in b/c/src/exec/posix/base/Makefile.in deleted file mode 100644 index 1d2e92cca0..0000000000 --- a/c/src/exec/posix/base/Makefile.in +++ /dev/null @@ -1,34 +0,0 @@ -# -# $Id$ -# - -@SET_MAKE@ -srcdir = @srcdir@ -VPATH = @srcdir@ -RTEMS_ROOT = @top_srcdir@ -PROJECT_ROOT = @PROJECT_ROOT@ - -#H_PIECES= aio devctl intr limits mqueue pthread sched semaphore \ -# signal time unistd -H_PIECES= pthread sched -# limits.h may have been moved into newlib -- check before removing it -# from the cvs tree -H_FILES=$(H_PIECES:%=$(srcdir)/%.h) - -SRCS=$(H_FILES) - -include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg -include $(RTEMS_ROOT)/make/leaf.cfg - -# -# Add your list of files to delete here. The config files -# already know how to delete some stuff, so you may want -# to just run 'make clean' first to see what gets missed. -# 'make clobber' already includes 'make clean' -# - -CLEAN_ADDITIONS += -CLOBBER_ADDITIONS += - -all: $(SRCS) - $(INSTALL) -m 444 ${H_FILES} $(PROJECT_INCLUDE) diff --git a/c/src/exec/posix/base/aio.h b/c/src/exec/posix/base/aio.h deleted file mode 100644 index 6348da4c15..0000000000 --- a/c/src/exec/posix/base/aio.h +++ /dev/null @@ -1,137 +0,0 @@ -/* aio.h - * - * $Id$ - */ - -#ifndef __POSIX_ASYNCHRONOUS_IO_h -#define __POSIX_ASYNCHRONOUS_IO_h - -#include - -#if defined(_POSIX_ASYNCHRONOUS_IO) - -/* - * 6.7.1 Data Definitions for Asynchronous Input and Output, - * P1003.1b-1993, p. 151 - */ - -#include -#include -#include -#include - -/* - * 6.7.1.2 Manifest Constants, P1003.1b-1993, p. 153 - */ - -#define AIO_CANCELED 0 /* all requested operations have been canceled */ -#define AIO_NOTCANCELED 1 /* some of the operations could not be canceled */ - /* since they are in progress */ -#define AIO_ALLDONE 2 /* none of the requested operations could be */ - /* canceled since they are already complete */ - -/* lio_listio() options */ - -#define LIO_WAIT 0 /* calling process is to suspend until the */ - /* operation is complete */ -#define LIO_NOWAIT 1 /* calling process is to continue execution while */ - /* the operation is performed and no notification */ - /* shall be given when the operation is completed */ -#define LIO_READ 2 /* request a read() */ -#define LIO_WRITE 3 /* request a write() */ -#define LIO_NOP 4 /* no transfer is requested */ - -/* - * 6.7.1.1 Asynchronous I/O Control Block, P1003.1b-1993, p. 151 - */ - -struct aiocb { - int aio_fildes; /* File descriptor */ - off_t aio_offset; /* File offset */ - volatile void *aio_buf; /* Location of buffer */ - size_t aio_nbytes; /* Length of transfer */ - int aio_reqprio; /* Request priority offset */ - struct sigevent aio_sigevent; /* Signal number and value */ - int aoi_lio_opcode; /* Operation to be performed */ -}; - -/* - * 6.7.2 Asynchronous Read, P1003.1b-1993, p. 154 - */ - -int aio_read( - struct aiocb *aiocbp -); - -/* - * 6.7.3 Asynchronous Write, P1003.1b-1993, p. 155 - */ - -int aio_write( - struct aiocb *aiocbp -); - -/* - * 6.7.4 List Directed I/O, P1003.1b-1993, p. 158 - */ - -int lio_listio( - int mode, - struct aiocb * const list[], - int nent, - struct sigevent *sig -); - -/* - * 6.7.5 Retrieve Error of Asynchronous I/O Operation, P1003.1b-1993, p. 161 - */ - -int aio_error( - const struct aiocb *aiocbp -); - -/* - * 6.7.6 Retrieve Return Status of Asynchronous I/O Operation, - * P1003.1b-1993, p. 162 - */ - -int aio_return( - const struct aiocb *aiocbp -); - -/* - * 6.7.7 Cancel Asynchronous I/O Operation, P1003.1b-1993, p. 163 - */ - -int aio_cancel( - int filedes, - struct aiocb *aiocbp -); - -/* - * 6.7.7 Wait for Asynchronous I/O Request, P1003.1b-1993, p. 164 - */ - -int aio_suspend( - struct aiocb * const list[], - int nent, - const struct timespec *timeout -); - -#if defined(_POSIX_SYNCHRONIZED_IO) - -/* - * 6.7.9 Asynchronous File Synchronization, P1003.1b-1993, p. 166 - */ - -int aio_fsync( - int op, - struct aiocb *aiocbp -); - -#endif /* _POSIX_SYNCHRONIZED_IO */ - -#endif /* _POSIX_ASYNCHRONOUS_IO */ - -#endif -/* end of include file */ diff --git a/c/src/exec/posix/base/devctl.h b/c/src/exec/posix/base/devctl.h deleted file mode 100644 index 5073b475ee..0000000000 --- a/c/src/exec/posix/base/devctl.h +++ /dev/null @@ -1,30 +0,0 @@ -/* devctl.h - * - * $Id$ - */ - -#ifndef __POSIX_DEVICE_CONTROL_h -#define __POSIX_DEVICE_CONTROL_h - -#include - -#if defined(_POSIX_DEVICE_CONTROL) - -#include -#include - -/* - * 21.2.1 Control a Device, P1003.4b/D8, p. 65 - */ - -int devctl( - int filedes, - void *dev_data_ptr, - size_t nbyte, - int *dev_info_ptr -); - -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/posix/base/intr.h b/c/src/exec/posix/base/intr.h deleted file mode 100644 index f07d1f9552..0000000000 --- a/c/src/exec/posix/base/intr.h +++ /dev/null @@ -1,72 +0,0 @@ -/* intr.h - * - * XXX: It is unclear if the type "intr_t" should be defined when - * _POSIX_INTERRUPT_CONTROL is not. - * - * $Id$ - */ - -#ifndef __POSIX_INTERRUPTS_h -#define __POSIX_INTERRUPTS_h - -#include -#include -#include - -#if defined(_POSIX_INTERRUPT_CONTROL) - -/* - * 22.2 Concepts, P1003.4b/D8, p. 73 - */ - -typedef int intr_t; - -/* - * 22.3.1 Associate a User-Written ISR with an Interrupt, P1003.4b/D8, p. 74 - */ - -/* - * Return codes from an interrupt handler - */ - -#define INTR_HANDLED_NOTIFY 0 /* ISR handled this interrupt, notify */ - /* the thread that registered the */ - /* ISR that the interrupt occurred. */ -#define INTR_HANDLED_DO_NOT_NOTIFY 1 /* ISR handled this interrupt, but */ - /* do NOT perform notification. */ -#define INTR_NOT_HANDLED 2 /* ISR did not handle this interrupt, */ - /* let the next handler try. */ - -int intr_capture( - intr_t intr, - int (*intr_handler)( void *area ), - volatile void *area, - size_t areasize -); - -int intr_release( - intr_t intr, - int (*intr_handler)( void *area ) -); - -int intr_lock( - intr_t intr -); - -int intr_unlock( - intr_t intr -); - -/* - * 22.3.2 Await Interrupt Notification, P1003.4b/D8, p. 76 - */ - -int intr_timed_wait( - int flags, - const struct timespec *timeout -); - -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/posix/base/limits.h b/c/src/exec/posix/base/limits.h deleted file mode 100644 index e8ac4bf2fd..0000000000 --- a/c/src/exec/posix/base/limits.h +++ /dev/null @@ -1,164 +0,0 @@ -/* limits.h - * - * This file lists the minimums for the limits set by each of - * the POSIX features subsets. - * - * XXX: Careful attention needs to be paid to section 2.8 in 1003.1b-1993 - * to segregrate the variables below based on their "class" according - * to our implementation. We also need to set the Run-Time Invariant - * and other related values. - * - * $Id$ - */ - -#include_next - -#ifndef __POSIX_LIMITS_h -#define __POSIX_LIMITS_h - -/* really only to get min stack size from */ -#include - -/**************************************************************************** - **************************************************************************** - * * - * P1003.1b-1993 defines the constants below this comment. * - * * - **************************************************************************** - ****************************************************************************/ - -#define _POSIX_AIO_LISTIO_MAX 2 -#define _POSIX_AIO_MAX 1 -#define _POSIX_ARG_MAX 4096 -#define _POSIX_CHILD_MAX 6 -#define _POSIX_DELAYTIMER_MAX 32 -#define _POSIX_LINK_MAX 8 -#define _POSIX_MAX_CANON 255 -#define _POSIX_MAX_INPUT 255 -#define _POSIX_MQ_OPEN_MAX 8 -#define _POSIX_MQ_PRIO_MAX 32 -#define _POSIX_NAME_MAX 14 -#define _POSIX_NGROUPS_MAX 0 -#define _POSIX_OPEN_MAX 16 -#define _POSIX_PATH_MAX 255 -#define _POSIX_PIPE_BUF 512 -#define _POSIX_RTSIG_MAX 8 -#define _POSIX_SEM_NSEMS_MAX 256 -#define _POSIX_SEM_VALUE_MAX 32767 -#define _POSIX_SIGQUEUE_MAX 32 -#define _POSIX_SSIZE_MAX 32767 -#define _POSIX_STREAM_MAX 8 -#define _POSIX_TIMER_MAX 32 -#define _POSIX_TZNAME_MAX 3 - -/* - * Definitions of the following may be omitted if the value is >= stated - * minimum but is indeterminate. - */ - -#define AIO_LISTIO_MAX 2 -#define AIO_MAX 1 -#define AIO_PRIO_DELTA_MAX 0 -#define ARG_MAX 4096 -#define CHILD_MAX 6 -#define DELAYTIMER_MAX 32 -#define MQ_OPEN_MAX 8 -#define MQ_PRIO_MAX 32 -#define OPEN_MAX 16 -#define PAGESIZE 1 -#define RTSIG_MAX 8 -#define SEM_NSEMS_MAX 256 -#define SEM_VALUE_MAX 32767 -#define SIGQUEUE_MAX 32 -#define STREAM_MAX 8 -#define TIMER_MAX 32 -#define TZNAME_MAX 3 - -/* - * Pathname Variables - */ - -#define LINK_MAX 8 -#define MAX_CANON 255 -#define MAX_INPUT 255 -#define NAME_MAX 14 -#define PATH_MAX 255 -#define PIPE_BUF 512 - -/* - * Invariant values - */ - -#define SSIZE_MAX 32767 - -/* - * Maximum Values - */ - -#define _POSIX_CLOCKRES_MIN 0 /* in nanoseconds */ - -/**************************************************************************** - **************************************************************************** - * * - * P1003.1c/D10 defines the constants below this comment. * - * - * XXX: doc seems to have printing problems in this table :( - * * - **************************************************************************** - ****************************************************************************/ - -#define _POSIX_LOGIN_NAME_MAX 9 -#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4 -#define _POSIX_THREAD_KEYS_MAX 28 -#define _POSIX_THREAD_THREADS_MAX 64 -#define _POSIX_TTY_NAME_MAX 9 - -/* - * Definitions of the following may be omitted if the value is >= stated - * minimum but is indeterminate. - */ - -#define LOGIN_NAME_MAX _POSIX_LOGIN_NAME_MAX -#define TTY_NAME_MAX _POSIX_TTY_NAME_MAX -#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS -#define PTHREAD_STACK_MIN CPU_STACK_MINIMUM_SIZE - -/* - * The maximum number of keys (PTHREAD_KEYS_MAX) and threads - * (PTHREAD_THREADS_MAX) are configurable and may exceed the minimum. - * -#define PTHREAD_KEYS_MAX _POSIX_THREAD_KEYS_MAX -#define PTHREAD_THREADS_MAX _POSIX_THREAD_THREADS_MAX -*/ - - -/**************************************************************************** - **************************************************************************** - * * - * P1003.4b/D8 defines the constants below this comment. * - * * - **************************************************************************** - ****************************************************************************/ - -#define _POSIX_INTERRUPT_OVERRUN_MAX 32 - -/* - * Definitions of the following may be omitted if the value is >= stated - * minimum but is indeterminate. - */ - -#define INTERRUPT_OVERRUN_MAX 32 - -/* - * Pathname Variables - */ - -#define MIN_ALLOC_SIZE -#define REC_MIN_XFER_SIZE -#define REC_MAX_XFER_SIZE -#define REC_INCR_XFER_SIZE -#define REC_XFER_ALIGN -#define MAX_ATOMIC_SIZE - -#endif -/* end of include file */ diff --git a/c/src/exec/posix/base/mqueue.h b/c/src/exec/posix/base/mqueue.h deleted file mode 100644 index f1b2250e5c..0000000000 --- a/c/src/exec/posix/base/mqueue.h +++ /dev/null @@ -1,145 +0,0 @@ -/* mqueue.h - * - * $Id$ - */ - -#ifndef __POSIX_MESSAGE_QUEUE_h -#define __POSIX_MESSAGE_QUEUE_h - -#include - -#if defined(_POSIX_MESSAGE_PASSING) - -#include - -#include -#include - -/* - * 15.1.1 Data Structures, P1003.1b-1993, p. 271 - */ - -typedef Objects_Id mqd_t; - -struct mq_attr { - long mq_flags; /* Message queue flags */ - long mq_maxmsg; /* Maximum number of messages */ - long mq_msgsize; /* Maximum message size */ - long mq_curmsgs; /* Number of messages currently queued */ -}; - -/* - * 15.2.2 Open a Message Queue, P1003.1b-1993, p. 272 - */ - -mqd_t mq_open( - const char *name, - int oflag, - ... -); - -/* - * 15.2.2 Close a Message Queue, P1003.1b-1993, p. 275 - */ - -int mq_close( - mqd_t mqdes -); - -/* - * 15.2.2 Remove a Message Queue, P1003.1b-1993, p. 276 - */ - -int mq_unlink( - const char *name -); - -/* - * 15.2.4 Send a Message to a Message Queue, P1003.1b-1993, p. 277 - * - * NOTE: P1003.4b/D8, p. 45 adds mq_timedsend(). - */ - -int mq_send( - mqd_t mqdes, - const char *msg_ptr, - size_t msg_len, - unsigned int msg_prio -); - -#if defined(_POSIX_TIMEOUTS) - -#include - -int mq_timedsend( - mqd_t mqdes, - const char *msg_ptr, - size_t msg_len, - unsigned int msg_prio, - const struct timespec *timeout -); - -#endif /* _POSIX_TIMEOUTS */ - -/* - * 15.2.5 Receive a Message From a Message Queue, P1003.1b-1993, p. 279 - * - * NOTE: P1003.4b/D8, p. 45 adds mq_timedreceive(). - */ - -ssize_t mq_receive( - mqd_t mqdes, - char *msg_ptr, - size_t msg_len, - unsigned int *msg_prio -); - -#if defined(_POSIX_TIMEOUTS) - -int mq_timedreceive( /* XXX: should this be ssize_t */ - mqd_t mqdes, - char *msg_ptr, - size_t msg_len, - unsigned int *msg_prio, - const struct timespec *timeout -); - -#endif /* _POSIX_TIMEOUTS */ - -#if defined(_POSIX_REALTIME_SIGNALS) - -/* - * 15.2.6 Notify Process that a Message is Available on a Queue, - * P1003.1b-1993, p. 280 - */ - -int mq_notify( - mqd_t mqdes, - const struct sigevent *notification -); - -#endif /* _POSIX_REALTIME_SIGNALS */ - -/* - * 15.2.7 Set Message Queue Attributes, P1003.1b-1993, p. 281 - */ - -int mq_setattr( - mqd_t mqdes, - const struct mq_attr *mqstat, - struct mq_attr *omqstat -); - -/* - * 15.2.8 Get Message Queue Attributes, P1003.1b-1993, p. 283 - */ - -int mq_getattr( - mqd_t mqdes, - struct mq_attr *mqstat -); - -#endif /* _POSIX_MESSAGE_PASSING */ - -#endif -/* end of include file */ diff --git a/c/src/exec/posix/base/pthread.h b/c/src/exec/posix/base/pthread.h deleted file mode 100644 index d70a794f38..0000000000 --- a/c/src/exec/posix/base/pthread.h +++ /dev/null @@ -1,500 +0,0 @@ -/* pthread.h - * - * $Id$ - */ - -#ifndef __PTHREAD_h -#define __PTHREAD_h - -#include - -#if defined(_POSIX_THREADS) - -#include -#include -#include - -/* - * 3.1.3 Register Fork Handlers, P1003.1c/Draft 10, P1003.1c/Draft 10, p. 27 - * - * RTEMS does not support processes, so we fall under this and do not - * provide this routine: - * - * "Either the implementation shall support the pthread_atfork() function - * as described above or the pthread_atfork() funciton shall not be - * provided." - */ - -/* - * 11.3.1 Mutex Initialization Attributes, P1003.1c/Draft 10, p. 81 - */ - -int pthread_mutexattr_init( - pthread_mutexattr_t *attr -); - -int pthread_mutexattr_destroy( - pthread_mutexattr_t *attr -); - -int pthread_mutexattr_getpshared( - const pthread_mutexattr_t *attr, - int *pshared -); - -int pthread_mutexattr_setpshared( - pthread_mutexattr_t *attr, - int pshared -); - -/* - * 11.3.2 Initializing and Destroying a Mutex, P1003.1c/Draft 10, p. 87 - */ - -int pthread_mutex_init( - pthread_mutex_t *mutex, - const pthread_mutexattr_t *attr -); - -int pthread_mutex_destroy( - pthread_mutex_t *mutex -); - -/* - * This is used to statically initialize a pthread_mutex_t. Example: - * - * pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; - */ - -#define PTHREAD_MUTEX_INITIALIZER ((pthread_mutex_t) 0xFFFFFFFF) - -/* - * 11.3.3 Locking and Unlocking a Mutex, P1003.1c/Draft 10, p. 93 - * - * NOTE: P1003.4b/D8 adds pthread_mutex_timedlock(), p. 29 - */ - -int pthread_mutex_lock( - pthread_mutex_t *mutex -); - -int pthread_mutex_trylock( - pthread_mutex_t *mutex -); - -int pthread_mutex_unlock( - pthread_mutex_t *mutex -); - -#if defined(_POSIX_TIMEOUTS) - -int pthread_mutex_timedlock( - pthread_mutex_t *mutex, - const struct timespec *timeout -); - -#endif /* _POSIX_TIMEOUTS */ - -/* - * 11.4.1 Condition Variable Initialization Attributes, - * P1003.1c/Draft 10, p. 96 - */ - -int pthread_condattr_init( - pthread_condattr_t *attr -); - -int pthread_condattr_destroy( - pthread_condattr_t *attr -); - -int pthread_condattr_getpshared( - const pthread_condattr_t *attr, - int *pshared -); - -int pthread_condattr_setpshared( - pthread_condattr_t *attr, - int pshared -); - -/* - * 11.4.2 Initializing and Destroying a Condition Variable, - * P1003.1c/Draft 10, p. 87 - */ - -int pthread_cond_init( - pthread_cond_t *cond, - const pthread_condattr_t *attr -); - -int pthread_cond_destroy( - pthread_cond_t *mutex -); - -/* - * This is used to statically initialize a pthread_cond_t. Example: - * - * pthread_cond_t cond = PTHREAD_COND_INITIALIZER; - */ - -#define PTHREAD_COND_INITIALIZER ((pthread_mutex_t) 0xFFFFFFFF) - -/* - * 11.4.3 Broadcasting and Signaling a Condition, P1003.1c/Draft 10, p. 101 - */ - -int pthread_cond_signal( - pthread_cond_t *cond -); - -int pthread_cond_broadcast( - pthread_cond_t *cond -); - -/* - * 11.4.4 Waiting on a Condition, P1003.1c/Draft 10, p. 105 - */ - -int pthread_cond_wait( - pthread_cond_t *cond, - pthread_mutex_t *mutex -); - -int pthread_cond_timedwait( - pthread_cond_t *cond, - pthread_mutex_t *mutex, - const struct timespec *abstime -); - -#if defined(_POSIX_THREAD_PRIORITY_SCHEDULING) - -/* - * 13.5.1 Thread Creation Scheduling Attributes, P1003.1c/Draft 10, p. 120 - */ - -int pthread_attr_setscope( - pthread_attr_t *attr, - int contentionscope -); - -int pthread_attr_getscope( - const pthread_attr_t *attr, - int *contentionscope -); - -int pthread_attr_setinheritsched( - pthread_attr_t *attr, - int inheritsched -); - -int pthread_attr_getinheritsched( - const pthread_attr_t *attr, - int *inheritsched -); - -int pthread_attr_setschedpolicy( - pthread_attr_t *attr, - int policy -); - -int pthread_attr_getschedpolicy( - const pthread_attr_t *attr, - int *policy -); - -#endif /* defined(_POSIX_THREAD_PRIORITY_SCHEDULING) */ - -int pthread_attr_setschedparam( - pthread_attr_t *attr, - const struct sched_param *param -); - -int pthread_attr_getschedparam( - const pthread_attr_t *attr, - struct sched_param *param -); - -#if defined(_POSIX_THREAD_PRIORITY_SCHEDULING) - -/* - * 13.5.2 Dynamic Thread Scheduling Parameters Access, - * P1003.1c/Draft 10, p. 124 - */ - -int pthread_getschedparam( - pthread_t thread, - int *policy, - struct sched_param *param -); - -int pthread_setschedparam( - pthread_t thread, - int policy, - struct sched_param *param -); - -#endif /* defined(_POSIX_THREAD_PRIORITY_SCHEDULING) */ - -#if defined(_POSIX_THREAD_PRIO_INHERIT) || defined(_POSIX_THREAD_PRIO_PROTECT) - -/* - * 13.6.1 Mutex Initialization Scheduling Attributes, P1003.1c/Draft 10, p. 128 - */ - -int pthread_mutexattr_setprotocol( - pthread_mutexattr_t *attr, - int protocol -); - -int pthread_mutexattr_getprotocol( - const pthread_mutexattr_t *attr, - int *protocol -); - -int pthread_mutexattr_setprioceiling( - pthread_mutexattr_t *attr, - int prioceiling -); - -int pthread_mutexattr_getprioceiling( - const pthread_mutexattr_t *attr, - int *prioceiling -); - -#endif /* _POSIX_THREAD_PRIO_INHERIT || _POSIX_THREAD_PRIO_PROTECT */ - -#if defined(_POSIX_THREAD_PRIO_PROTECT) - -/* - * 13.6.2 Change the Priority Ceiling of a Mutex, P1003.1c/Draft 10, p. 131 - */ - -int pthread_mutex_setprioceiling( - pthread_mutex_t *mutex, - int prioceiling, - int *old_ceiling -); - -int pthread_mutex_getprioceiling( - pthread_mutex_t *mutex, - int *prioceiling -); - -#endif /* _POSIX_THREAD_PRIO_PROTECT */ - -/* - * 16.1.1 Thread Creation Attributes, P1003.1c/Draft 10, p, 140 - */ - -int pthread_attr_init( - pthread_attr_t *attr -); - -int pthread_attr_destroy( - pthread_attr_t *attr -); - -int pthread_attr_getstacksize( - const pthread_attr_t *attr, - size_t *stacksize -); - -int pthread_attr_setstacksize( - pthread_attr_t *attr, - size_t stacksize -); - -int pthread_attr_getstackaddr( - const pthread_attr_t *attr, - void **stackaddr -); - -int pthread_attr_setstackaddr( - pthread_attr_t *attr, - void *stackaddr -); - -int pthread_attr_getdetachstate( - const pthread_attr_t *attr, - int *detachstate -); - -int pthread_attr_setdetachstate( - pthread_attr_t *attr, - int detachstate -); - -/* - * 16.1.2 Thread Creation, P1003.1c/Draft 10, p. 144 - */ - -int pthread_create( - pthread_t *thread, - const pthread_attr_t *attr, - void *(*start_routine)( void * ), - void *arg -); - -/* - * 16.1.3 Wait for Thread Termination, P1003.1c/Draft 10, p. 147 - */ - -int pthread_join( - pthread_t thread, - void **value_ptr -); - -/* - * 16.1.4 Detaching a Thread, P1003.1c/Draft 10, p. 149 - */ - -int pthread_detach( - pthread_t thread -); - -/* - * 16.1.5.1 Thread Termination, p1003.1c/Draft 10, p. 150 - */ - -void pthread_exit( - void *value_ptr -); - -/* - * 16.1.6 Get Calling Thread's ID, p1003.1c/Draft 10, p. XXX - */ - -pthread_t pthread_self( void ); - -/* - * 16.1.7 Compare Thread IDs, p1003.1c/Draft 10, p. 153 - */ - -int pthread_equal( - pthread_t t1, - pthread_t t2 -); - -/* - * 16.1.8 Dynamic Package Initialization - */ - -/* - * This is used to statically initialize a pthread_once_t. Example: - * - * pthread_once_t once = PTHREAD_ONCE_INIT; - * - * NOTE: This is named inconsistently -- it should be INITIALIZER. - */ - -#define PTHREAD_ONCE_INIT { 1, 0 } /* is initialized and not run */ - -int pthread_once( - pthread_once_t *once_control, - void (*init_routine)(void) -); - -/* - * 17.1.1 Thread-Specific Data Key Create, P1003.1c/Draft 10, p. 163 - */ - -int pthread_key_create( - pthread_key_t *key, - void (*destructor)( void * ) -); - -/* - * 17.1.2 Thread-Specific Data Management, P1003.1c/Draft 10, p. 165 - */ - -int pthread_setspecific( - pthread_key_t key, - const void *value -); - -void *pthread_getspecific( - pthread_key_t key -); - -/* - * 17.1.3 Thread-Specific Data Key Deletion, P1003.1c/Draft 10, p. 167 - */ - -int pthread_key_delete( - pthread_key_t key -); - -/* - * 18.2.1 Canceling Execution of a Thread, P1003.1c/Draft 10, p. 181 - */ - -#define PTHREAD_CANCEL_ENABLE 0 -#define PTHREAD_CANCEL_DISABLE 1 - -#define PTHREAD_CANCEL_DEFERRED 0 -#define PTHREAD_CANCEL_ASYNCHRONOUS 1 - -int pthread_cancel( - pthread_t thread -); - -/* - * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 - */ - -int pthread_setcancelstate( - int state, - int *oldstate -); - -int pthread_setcanceltype( - int type, - int *oldtype -); - -void pthread_testcancel( void ); - -/* - * 18.2.3.1 Establishing Cancellation Handlers, P1003.1c/Draft 10, p. 184 - */ - -void pthread_cleanup_push( - void (*routine)( void * ), - void *arg -); - -void pthread_cleanup_pop( - int execute -); - -#if defined(_POSIX_THREAD_CPUTIME) - -/* - * 20.1.6 Accessing a Thread CPU-time Clock, P1003.4b/D8, p. 58 - */ - -int pthread_getcpuclockid( - pthread_t thread_id, - clockid_t *clock_id -); - -/* - * 20.1.7 CPU-time Clock Thread Creation Attribute, P1003.4b/D8, p. 59 - */ - -int pthread_attr_setcputime( - pthread_attr_t *attr, - int clock_allowed -); - -int pthread_attr_getcputime( - pthread_attr_t *attr, - int *clock_allowed -); - -#endif /* defined(_POSIX_THREAD_CPUTIME) */ - -#endif /* defined(_POSIX_THREADS) */ -#endif -/* end of include file */ diff --git a/c/src/exec/posix/base/sched.h b/c/src/exec/posix/base/sched.h deleted file mode 100644 index 14a603c0c5..0000000000 --- a/c/src/exec/posix/base/sched.h +++ /dev/null @@ -1,88 +0,0 @@ -/* sched.h - * - * $Id$ - */ - - -#ifndef __POSIX_SCHEDULING_h -#define __POSIX_SCHEDULING_h - -#include - -#if defined(_POSIX_PRIORITY_SCHEDULING) - -#include -#include -#include -#include - -/* - * 13.3.1 Set Scheduling Parameters, P1003.1b-1993, p. 252 - * - */ - -int sched_setparam( - pid_t pid, - const struct sched_param *param -); - -/* - * 13.3.2 Set Scheduling Parameters, P1003.1b-1993, p. 253 - */ - -int sched_getparam( - pid_t pid, - const struct sched_param *param -); - -/* - * 13.3.3 Set Scheduling Policy and Scheduling Parameters, - * P1003.1b-1993, p. 254 - */ - -int sched_setscheduler( - pid_t pid, - int policy, - const struct sched_param *param -); - -/* - * 13.3.4 Get Scheduling Policy, P1003.1b-1993, p. 256 - */ - -int sched_getscheduler( - pid_t pid -); - -/* - * 13.3.6 Get Scheduling Parameter Limits, P1003.1b-1993, p. 258 - */ - -int sched_get_priority_max( - int policy -); - -int sched_get_priority_min( - int policy -); - -int sched_rr_get_interval( - pid_t pid, - struct timespec *interval -); - -#endif /* _POSIX_PRIORITY_SCHEDULING */ - -#if defined(_POSIX_THREADS) || defined(_POSIX_PRIORITY_SCHEDULING) - -/* - * 13.3.5 Yield Processor, P1003.1b-1993, p. 257 - */ - -int sched_yield( void ); - -#endif /* _POSIX_THREADS or _POSIX_PRIORITY_SCHEDULING */ - -#endif -/* end of include file */ - diff --git a/c/src/exec/posix/base/semaphore.h b/c/src/exec/posix/base/semaphore.h deleted file mode 100644 index 0388f91ad9..0000000000 --- a/c/src/exec/posix/base/semaphore.h +++ /dev/null @@ -1,108 +0,0 @@ -/* semaphore.h - * - * $Id$ - */ - -#ifndef __POSIX_SEMAPHORE_h -#define __POSIX_SEMAPHORE_h - -#include - -#if defined(_POSIX_SEMAPHORES) - -#include - -/* - * 11.1 Semaphore Characteristics, P1003.1b-1993, p.219 - */ - -typedef int sem_t; - -/* - * 11.2.1 Initialize an Unnamed Semaphore, P1003.1b-1993, p.219 - */ - -int sem_init( - sem_t *sem, - int pshared, - unsigned int value -); - -/* - * 11.2.2 Destroy an Unnamed Semaphore, P1003.1b-1993, p.220 - */ - -int sem_destroy( - sem_t *sem -); - -/* - * 11.2.3 Initialize/Open a Named Semaphore, P1003.1b-1993, p.221 - * - * NOTE: Follows open() calling conventions. - */ - -sem_t *sem_open( - const char *name, - int oflag, - ... -); - -/* - * 11.2.4 Close a Named Semaphore, P1003.1b-1993, p.224 - */ - -int sem_close( - sem_t *sem -); - -/* - * 11.2.5 Remove a Named Semaphore, P1003.1b-1993, p.225 - */ - -int sem_unlink( - const char *name -); - -/* - * 11.2.6 Lock a Semaphore, P1003.1b-1993, p.226 - * - * NOTE: P1003.4b/D8 adds sem_timedwait(), p. 27 - */ - -int sem_wait( - sem_t *sem -); - -int sem_trywait( - sem_t *sem -); - -#if defined(_POSIX_TIMEOUTS) -int sem_timedwait( - sem_t *sem, - const struct timespec *timeout -); -#endif - -/* - * 11.2.7 Unlock a Semaphore, P1003.1b-1993, p.227 - */ - -int sem_post( - sem_t *sem -); - -/* - * 11.2.8 Get the Value of a Semaphore, P1003.1b-1993, p.229 - */ - -int sem_getvalue( - sem_t *sem, - int *sval -); - -#endif /* _POSIX_SEMAPHORES */ - -#endif -/* end of include file */ diff --git a/c/src/exec/posix/base/unistd.h b/c/src/exec/posix/base/unistd.h deleted file mode 100644 index 0001ecc475..0000000000 --- a/c/src/exec/posix/base/unistd.h +++ /dev/null @@ -1,89 +0,0 @@ -/* unistd.h - * - * $Id$ - */ - -#ifndef __POSIX_UNISTD_h -#define __POSIX_UNISTD_h - -#include - -/* - * 4.8.1 Get Configurable System Variables, P1003.1b-1993, p. 96 - * - * NOTE: Table 4-2, Configurable System Variables, p. 96 - */ - -#define _SC_AIO_LISTIO_MAX 0 -#define _SC_AIO_MAX 1 -#define _SC_AIO_PRIO_DELTA_MAX 2 -#define _SC_ARG_MAX 3 -#define _SC_CHILD_MAX 4 -#define _SC_CLK_TCK 5 -#define _SC_DELAYTIMER_MAX 6 -#define _SC_MQ_OPEN_MAX 7 -#define _SC_MQ_PRIO_MAX 8 -#define _SC_NGROUPS_MAX 9 -#define _SC_OPEN_MAX 10 -#define _SC_PAGESIZE 11 -#define _SC_RTSIG_MAX 12 -#define _SC_SEM_NSEMS_MAX 13 -#define _SC_SEM_VALUE_MAX 14 -#define _SC_SIGQUEUE_MAX 15 -#define _SC_STREAM_MAX 16 -#define _SC_TIMER_MAX 17 -#define _SC_TZNAME_MAX 18 - -#define _SC_ASYNCHRONOUS_IO 19 -#define _SC_FSYNC 20 -#define _SC_JOB_CONTROL 21 -#define _SC_MAPPED_FILES 22 -#define _SC_MEMLOCK 23 -#define _SC_MEMLOCK_RANGE 24 -#define _SC_MEMORY_PROTECTION 25 -#define _SC_MESSAGE_PASSING 26 -#define _SC_PRIORITIZED_IO 27 -#define _SC_REALTIME_SIGNALS 28 -#define _SC_SAVED_IDS 29 -#define _SC_SEMAPHORES 30 -#define _SC_SHARED_MEMORY_OBJECTS 31 -#define _SC_SYNCHRONIZED_IO 32 -#define _SC_TIMERS 33 -#define _SC_VERSION 34 - -/* - * P1003.1c/D10, p. 52 adds the following. - */ - -#define _SC_GETGR_R_SIZE_MAX 35 -#define _SC_GETPW_R_SIZE_MAX 36 -#define _SC_LOGIN_NAME_MAX 37 -#define _SC_THREAD_DESTRUCTOR_ITERATIONS 38 -#define _SC_THREAD_KEYS_MAX 39 -#define _SC_THREAD_STACK_MIN 40 -#define _SC_THREAD_THREADS_MAX 41 -#define _SC_TTY_NAME_MAX 42 - -#define _SC_THREADS 43 -#define _SC_THREAD_ATTR_STACKADDR 44 -#define _SC_THREAD_ATTR_STACKSIZE 45 -#define _SC_THREAD_PRIORITY_SCHEDULING 46 -#define _SC_THREAD_PRIO_INHERIT 47 -#define _SC_THREAD_PRIO_CEILING 48 -#define _SC_THREAD_PROCESS_SHARED 49 -#define _SC_THREAD_SAFE_FUNCTIONS 50 - -/* JRS: 04/02/98: _SC_THREAD_PRIO_CEILING seems to have changed names - * in the final standard to _SC_THREAD_PRIO_PROTECT. - */ - -/* - * 4.8.1 Get Configurable System Variables, P1003.1b-1993, p. 95 - */ - -long sysconf( - int name -); - -#endif -/* end of include */ diff --git a/c/src/exec/posix/headers/Makefile.in b/c/src/exec/posix/headers/Makefile.in deleted file mode 100644 index 3c75974208..0000000000 --- a/c/src/exec/posix/headers/Makefile.in +++ /dev/null @@ -1,38 +0,0 @@ -# -# $Id$ -# - -@SET_MAKE@ -srcdir = @srcdir@ -VPATH = @srcdir@ -RTEMS_ROOT = @top_srcdir@ -PROJECT_ROOT = @PROJECT_ROOT@ - -# We only build multiprocessing related files if HAS_MP was defined -MP_PIECES_yes_V = condmp mutexmp pthreadmp -MP_PIECES = $(MP_PIECES_$(HAS_MP)_V) - -H_PIECES= cond config key mutex posixapi \ - priority psignal pthread seterr threadsup time -#H_PIECES= cancel cond intr key mqueue mqueuemp mutex \ -# mutexmp pthread pthreadmp priority semaphore semaphoremp threadsup \ -# time -H_FILES=$(H_PIECES:%=$(srcdir)/%.h) - -SRCS=$(H_FILES) - -include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg -include $(RTEMS_ROOT)/make/leaf.cfg - -# -# Add your list of files to delete here. The config files -# already know how to delete some stuff, so you may want -# to just run 'make clean' first to see what gets missed. -# 'make clobber' already includes 'make clean' -# - -CLEAN_ADDITIONS += -CLOBBER_ADDITIONS += - -all: $(SRCS) - $(INSTALL) -m 444 ${H_FILES} $(PROJECT_INCLUDE)/rtems/posix diff --git a/c/src/exec/posix/headers/cancel.h b/c/src/exec/posix/headers/cancel.h deleted file mode 100644 index e6d80275f4..0000000000 --- a/c/src/exec/posix/headers/cancel.h +++ /dev/null @@ -1,16 +0,0 @@ -/* rtems/posix/cancel.h - * - * $Id$ - */ - -#ifndef __RTEMS_POSIX_CANCEL_h -#define __RTEMS_POSIX_CANCEL_h - -typedef struct { - Chain_Node Node; - void (*routine)( void * ); - void *arg; -} POSIX_Cancel_Handler_control; - -#endif -/* end of include file */ diff --git a/c/src/exec/posix/headers/cond.h b/c/src/exec/posix/headers/cond.h deleted file mode 100644 index 0fb44d8042..0000000000 --- a/c/src/exec/posix/headers/cond.h +++ /dev/null @@ -1,132 +0,0 @@ -/* rtems/posix/cond.h - * - * This include file contains all the private support information for - * POSIX condition variables. - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#ifndef __RTEMS_POSIX_CONDITION_VARIABLES_h -#define __RTEMS_POSIX_CONDITION_VARIABLES_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -/* - * Constant to indicate condition variable does not currently have - * a mutex assigned to it. - */ - -#define POSIX_CONDITION_VARIABLES_NO_MUTEX 0 - -/* - * Data Structure used to manage a POSIX condition variable - */ - -typedef struct { - Objects_Control Object; - int process_shared; - pthread_mutex_t Mutex; - Thread_queue_Control Wait_queue; -} POSIX_Condition_variables_Control; - -/* - * The following defines the information control block used to manage - * this class of objects. - */ - -POSIX_EXTERN Objects_Information _POSIX_Condition_variables_Information; - -/* - * _POSIX_Condition_variables_Manager_initialization - * - * DESCRIPTION: - * - * This routine performs the initialization necessary for this manager. - */ - -void _POSIX_Condition_variables_Manager_initialization( - unsigned32 maximum_condition_variables -); - -/* - * _POSIX_Condition_variables_Allocate - * - * DESCRIPTION: - * - * This function allocates a condition variable control block from - * the inactive chain of free condition variable control blocks. - */ - -RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control * - _POSIX_Condition_variables_Allocate( void ); - -/* - * _POSIX_Condition_variables_Free - * - * DESCRIPTION: - * - * This routine frees a condition variable control block to the - * inactive chain of free condition variable control blocks. - */ - -RTEMS_INLINE_ROUTINE void _POSIX_Condition_variables_Free ( - POSIX_Condition_variables_Control *the_condition_variable -); - -/* - * _POSIX_Condition_variables_Get - * - * DESCRIPTION: - * - * This function maps condition variable IDs to condition variable control - * blocks. If ID corresponds to a local condition variable, then it returns - * the_condition variable control pointer which maps to ID and location - * is set to OBJECTS_LOCAL. if the condition variable ID is global and - * resides on a remote node, then location is set to OBJECTS_REMOTE, - * and the_condition variable is undefined. Otherwise, location is set - * to OBJECTS_ERROR and the_condition variable is undefined. - */ - -RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get ( - Objects_Id *id, - Objects_Locations *location -); - -/* - * _POSIX_Condition_variables_Is_null - * - * DESCRIPTION: - * - * This function returns TRUE if the_condition variable is NULL - * and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _POSIX_Condition_variables_Is_null ( - POSIX_Condition_variables_Control *the_condition_variable -); - -#include -#if defined(RTEMS_MULTIPROCESSING) -#include -#endif - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ - diff --git a/c/src/exec/posix/headers/condmp.h b/c/src/exec/posix/headers/condmp.h deleted file mode 100644 index de9c5ce0d4..0000000000 --- a/c/src/exec/posix/headers/condmp.h +++ /dev/null @@ -1,162 +0,0 @@ -/* condmp.h - * - * This include file contains all the constants and structures associated - * with the Multiprocessing Support in the POSIX Condition Variable Manager. - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#ifndef __RTEMS_POSIX_CONDITION_VARIABLES_MP_h -#define __RTEMS_POSIX_CONDITION_VARIABLES_MP_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include -#include - -/* - * The following enumerated type defines the list of - * remote condition variable operations. - */ - -typedef enum { - POSIX_CONDITION_VARIABLES_MP_ANNOUNCE_CREATE = 0, - POSIX_CONDITION_VARIABLES_MP_ANNOUNCE_DELETE = 1, - POSIX_CONDITION_VARIABLES_MP_EXTRACT_PROXY = 2, - POSIX_CONDITION_VARIABLES_MP_OBTAIN_REQUEST = 3, - POSIX_CONDITION_VARIABLES_MP_OBTAIN_RESPONSE = 4, - POSIX_CONDITION_VARIABLES_MP_RELEASE_REQUEST = 5, - POSIX_CONDITION_VARIABLES_MP_RELEASE_RESPONSE = 6, -} POSIX_Condition_variables_MP_Remote_operations; - -/* - * The following data structure defines the packet used to perform - * remote condition variable operations. - */ - -typedef struct { - MP_packet_Prefix Prefix; - POSIX_Condition_variables_MP_Remote_operations operation; - Objects_Name name; - boolean wait; /* XXX options */ - Objects_Id proxy_id; -} POSIX_Condition_variables_MP_Packet; - -/* - * _POSIX_Condition_variables_MP_Send_process_packet - * - * DESCRIPTION: - * - * This routine performs a remote procedure call so that a - * process operation can be performed on another node. - */ - -void _POSIX_Condition_variables_MP_Send_process_packet ( - POSIX_Condition_variables_MP_Remote_operations operation, - Objects_Id condition_variables_id, - Objects_Name name, - Objects_Id proxy_id -); - -/* - * _POSIX_Condition_variables_MP_Send_request_packet - * - * DESCRIPTION: - * - * This routine performs a remote procedure call so that a - * directive operation can be initiated on another node. - */ - -int _POSIX_Condition_variables_MP_Send_request_packet ( - POSIX_Condition_variables_MP_Remote_operations operation, - Objects_Id condition_variables_id, - boolean wait, /* XXX options */ - Watchdog_Interval timeout -); - -/* - * _POSIX_Condition_variables_MP_Send_response_packet - * - * DESCRIPTION: - * - * This routine performs a remote procedure call so that a - * directive can be performed on another node. - */ - -void _POSIX_Condition_variables_MP_Send_response_packet ( - POSIX_Condition_variables_MP_Remote_operations operation, - Objects_Id condition_variables_id, - Thread_Control *the_thread -); - -/* - * - * _POSIX_Condition_variables_MP_Process_packet - * - * DESCRIPTION: - * - * This routine performs the actions specific to this package for - * the request from another node. - */ - -void _POSIX_Condition_variables_MP_Process_packet ( - MP_packet_Prefix *the_packet_prefix -); - -/* - * _POSIX_Condition_variables_MP_Send_object_was_deleted - * - * DESCRIPTION: - * - * This routine is invoked indirectly by the thread queue - * when a proxy has been removed from the thread queue and - * the remote node must be informed of this. - */ - -void _POSIX_Condition_variables_MP_Send_object_was_deleted ( - Thread_Control *the_proxy -); - -/* - * _POSIX_Condition_variables_MP_Send_extract_proxy - * - * DESCRIPTION: - * - * This routine is invoked when a task is deleted and it - * has a proxy which must be removed from a thread queue and - * the remote node must be informed of this. - */ - -void _POSIX_Condition_variables_MP_Send_extract_proxy ( - Thread_Control *the_thread -); - -/* - * _POSIX_Condition_variables_MP_Get_packet - * - * DESCRIPTION: - * - * This function is used to obtain a condition variable mp packet. - */ - -POSIX_Condition_variables_MP_Packet - *_POSIX_Condition_variables_MP_Get_packet ( void ); - -#ifdef __cplusplus -} -#endif - -#endif -/* end of file */ diff --git a/c/src/exec/posix/headers/config.h b/c/src/exec/posix/headers/config.h deleted file mode 100644 index 8753c42382..0000000000 --- a/c/src/exec/posix/headers/config.h +++ /dev/null @@ -1,59 +0,0 @@ -/* config.h - * - * This include file contains the table of user defined configuration - * parameters specific for the POSIX API. - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#ifndef __RTEMS_POSIX_CONFIGURATION_h -#define __RTEMS_POSIX_CONFIGURATION_h - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * XXX - * - * The following records define the Configuration Table. The - * information contained in this table is required in all - * RTEMS systems, whether single or multiprocessor. This - * table primarily defines the following: - * - * + required number of each object type - */ - -/* - * For now, we are only allowing the user to specify the entry point - * for posix initialization threads. - */ - -typedef struct { - void *(*thread_entry)(void *); -} posix_initialization_threads_table; - -typedef struct { - int maximum_threads; - int maximum_mutexes; - int maximum_condition_variables; - int maximum_keys; - int maximum_queued_signals; - int number_of_initialization_threads; - posix_initialization_threads_table *User_initialization_threads_table; -} posix_api_configuration_table; - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/posix/headers/intr.h b/c/src/exec/posix/headers/intr.h deleted file mode 100644 index 539c66f058..0000000000 --- a/c/src/exec/posix/headers/intr.h +++ /dev/null @@ -1,154 +0,0 @@ -/* rtems/posix/intr.h - * - * This include file contains all the private support information for - * POSIX Interrupt Manager. - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#ifndef __RTEMS_POSIX_KEY_h -#define __RTEMS_POSIX_KEY_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -/* - * Data Structure used to manage each POSIX Interrupt Vector - */ - -typedef struct { - int number_installed; - int lock_count; - int deferred_count; - Chain_Control Handlers; -} POSIX_Interrupt_Control; - -/* - * Data Structure used to manage a POSIX Interrupt Handler - */ - -typedef struct { - Objects_Control Object; - int is_active; - intr_t vector; - Thread_Control *server; - int (*handler)( void *area ); - volatile void *user_data_area; -} POSIX_Interrupt_Handler_control; - -/* - * The following defines the information control block used to manage - * this class of objects. - */ - -POSIX_EXTERN Objects_Information _POSIX_Interrupt_Handlers_Information; - -/* - * The following is an array which is used to manage the set of - * interrupt handlers installed on each vector. - */ - -POSIX_EXTERN POSIX_Interrupt_Control - _POSIX_Interrupt_Information[ ISR_NUMBER_OF_VECTORS ]; - -/* - * _POSIX_Interrupt_Manager_initialization - * - * DESCRIPTION: - * - * This routine performs the initialization necessary for this manager. - */ - -void _POSIX_Interrupt_Manager_initialization( - unsigned32 maximum_interrupt_handlers -); - -/* - * _POSIX_Interrupt_Allocate - * - * DESCRIPTION: - * - * This function allocates a interrupt handler control block from - * the inactive chain of free interrupt handler control blocks. - */ - -RTEMS_INLINE_ROUTINE POSIX_Interrupt_Handler_control * - _POSIX_Interrupt_Allocate( void ); - -/* - * _POSIX_Interrupt_Free - * - * DESCRIPTION: - * - * This routine frees a interrupt handler control block to the - * inactive chain of free interrupt handler control blocks. - */ - -RTEMS_INLINE_ROUTINE void _POSIX_Interrupt_Free ( - POSIX_Interrupt_Handler_control *the_intr -); - -/* - * _POSIX_Interrupt_Get - * - * DESCRIPTION: - * - * This function maps interrupt handler IDs to interrupt handler control - * blocks. If ID corresponds to a local interrupt handler, then it returns - * the_intr control pointer which maps to ID and location - * is set to OBJECTS_LOCAL. if the interrupt handler ID is global and - * resides on a remote node, then location is set to OBJECTS_REMOTE, - * and the_intr is undefined. Otherwise, location is set - * to OBJECTS_ERROR and the_intr is undefined. - */ - -RTEMS_INLINE_ROUTINE POSIX_Interrupt_Control *_POSIX_Interrupt_Get ( - Objects_Id id, - Objects_Locations *location -); - -/* - * _POSIX_Interrupt_Is_null - * - * DESCRIPTION: - * - * This function returns TRUE if the_intr is NULL and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _POSIX_Interrupt_Is_null ( - POSIX_Interrupt_Handler_control *the_intr -); - -/* - * _POSIX_Interrupt_Handler - * - * DESCRIPTION: - * - * This function XXX. - */ - -void _POSIX_Interrupt_Handler( - ISR_Vector_number vector -); - -#include - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ - diff --git a/c/src/exec/posix/headers/key.h b/c/src/exec/posix/headers/key.h deleted file mode 100644 index 22bfafd594..0000000000 --- a/c/src/exec/posix/headers/key.h +++ /dev/null @@ -1,136 +0,0 @@ -/* rtems/posix/key.h - * - * This include file contains all the private support information for - * POSIX key. - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#ifndef __RTEMS_POSIX_KEY_h -#define __RTEMS_POSIX_KEY_h - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Data Structure used to manage a POSIX key - * - * NOTE: The Values is a table indexed by the index portion of the - * ID of the currently executing thread. - */ - -typedef struct { - Objects_Control Object; - boolean is_active; - void (*destructor)( void * ); - void **Values[ OBJECTS_CLASSES_LAST_THREAD_CLASS + 1 ]; -} POSIX_Keys_Control; - -/* - * The following defines the information control block used to manage - * this class of objects. - */ - -POSIX_EXTERN Objects_Information _POSIX_Keys_Information; - -/* - * _POSIX_Keys_Manager_initialization - * - * DESCRIPTION: - * - * This routine performs the initialization necessary for this manager. - */ - -void _POSIX_Key_Manager_initialization( - unsigned32 maximum_keys -); - -/* - * _POSIX_Keys_Run_destructors - * - * DESCRIPTION: - * - * This function executes all the destructors associated with the thread's - * keys. This function will execute until all values have been set to NULL. - * - * NOTE: This is the routine executed when a thread exits to - * run through all the keys and do the destructor action. - */ - -void _POSIX_Keys_Run_destructors( - Thread_Control *thread -); - -/* - * _POSIX_Keys_Allocate - * - * DESCRIPTION: - * - * This function allocates a keys control block from - * the inactive chain of free keys control blocks. - */ - -RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Allocate( void ); - -/* - * _POSIX_Keys_Free - * - * DESCRIPTION: - * - * This routine frees a keys control block to the - * inactive chain of free keys control blocks. - */ - -RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free ( - POSIX_Keys_Control *the_key -); - -/* - * _POSIX_Keys_Get - * - * DESCRIPTION: - * - * This function maps key IDs to key control blocks. - * If ID corresponds to a local keys, then it returns - * the_key control pointer which maps to ID and location - * is set to OBJECTS_LOCAL. if the keys ID is global and - * resides on a remote node, then location is set to OBJECTS_REMOTE, - * and the_key is undefined. Otherwise, location is set - * to OBJECTS_ERROR and the_key is undefined. - */ - -RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Get ( - Objects_Id id, - Objects_Locations *location -); - -/* - * _POSIX_Keys_Is_null - * - * DESCRIPTION: - * - * This function returns TRUE if the_key is NULL and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _POSIX_Keys_Is_null ( - POSIX_Keys_Control *the_key -); - -#include - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ - diff --git a/c/src/exec/posix/headers/mqueue.h b/c/src/exec/posix/headers/mqueue.h deleted file mode 100644 index f73cb509ce..0000000000 --- a/c/src/exec/posix/headers/mqueue.h +++ /dev/null @@ -1,188 +0,0 @@ -/* rtems/posix/mqueue.h - * - * This include file contains all the private support information for - * POSIX Message Queues. - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#ifndef __RTEMS_POSIX_MESSAGE_QUEUE_h -#define __RTEMS_POSIX_MESSAGE_QUEUE_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -/* - * Data Structure used to manage a POSIX message queue - */ - -typedef struct { - Objects_Control Object; - int process_shared; - int flags; - boolean named; - boolean linked; - boolean blocking; - unsigned32 open_count; - CORE_message_queue_Control Message_queue; - struct sigevent notification; -} POSIX_Message_queue_Control; - -/* - * The following defines the information control block used to manage - * this class of objects. - */ - -POSIX_EXTERN Objects_Information _POSIX_Message_queue_Information; - -/* - * _POSIX_Message_queue_Manager_initialization - * - * DESCRIPTION: - * - * This routine performs the initialization necessary for this manager. - */ - -void _POSIX_Message_queue_Manager_initialization( - unsigned32 maximum_message_queues -); - -/* - * - * _POSIX_Message_queue_Create_support - * - * DESCRIPTION: - * - * This routine performs the creation of a message queue utilizing the - * core message queue. - */ - -int _POSIX_Message_queue_Create_support( - const char *name, - int pshared, - unsigned int oflag, - struct mq_attr *attr, - POSIX_Message_queue_Control **message_queue -); - -/* - * - * _POSIX_Message_queue_Send_support - * - * DESCRIPTION: - * - * This routine posts a message to a specified message queue. - */ - -int _POSIX_Message_queue_Send_support( - mqd_t mqdes, - const char *msg_ptr, - unsigned32 msg_len, - Priority_Control msg_prio, - Watchdog_Interval timeout -); - -/* - * _POSIX_Message_queue_Allocate - * - * DESCRIPTION: - * - * This function allocates a message queue control block from - * the inactive chain of free message queue control blocks. - */ - -RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Allocate( void ); - -/* - * _POSIX_Message_queue_Free - * - * DESCRIPTION: - * - * This routine frees a message queue control block to the - * inactive chain of free message queue control blocks. - */ - -RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free ( - POSIX_Message_queue_Control *the_mq -); - -/* - * _POSIX_Message_queue_Get - * - * DESCRIPTION: - * - * This function maps message queue IDs to message queue control blocks. - * If ID corresponds to a local message queue, then it returns - * the_mq control pointer which maps to ID and location - * is set to OBJECTS_LOCAL. if the message queue ID is global and - * resides on a remote node, then location is set to OBJECTS_REMOTE, - * and the_message queue is undefined. Otherwise, location is set - * to OBJECTS_ERROR and the_mq is undefined. - */ - -RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Get ( - Objects_Id id, - Objects_Locations *location -); - -/* - * _POSIX_Message_queue_Is_null - * - * DESCRIPTION: - * - * This function returns TRUE if the_message_queue is NULL and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _POSIX_Message_queue_Is_null ( - POSIX_Message_queue_Control *the_mq -); - -/* - * _POSIX_Message_queue_Name_to_id - * - * DESCRIPTION: - * - * XXX - */ - -int _POSIX_Message_queue_Name_to_id( - const char *name, - Objects_Id *id -); - -/* - * _POSIX_Message_queue_Priority_to_core - * - * DESCRIPTION: - * - * XXX - */ - -RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Message_queue_Priority_to_core( - unsigned int priority -); - -#include -#if defined(RTEMS_MULTIPROCESSING) -#include -#endif - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ - diff --git a/c/src/exec/posix/headers/mqueuemp.h b/c/src/exec/posix/headers/mqueuemp.h deleted file mode 100644 index 27742014ab..0000000000 --- a/c/src/exec/posix/headers/mqueuemp.h +++ /dev/null @@ -1,161 +0,0 @@ -/* mqueuemp.h - * - * This include file contains all the constants and structures associated - * with the Multiprocessing Support in the POSIX Message Queue Manager. - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#ifndef __RTEMS_POSIX_MESSAGE_QUEUE_MP_h -#define __RTEMS_POSIX_MESSAGE_QUEUE_MP_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include -#include - -/* - * The following enumerated type defines the list of - * remote message queue operations. - */ - -typedef enum { - POSIX_MESSAGE_QUEUE_MP_ANNOUNCE_CREATE = 0, - POSIX_MESSAGE_QUEUE_MP_ANNOUNCE_DELETE = 1, - POSIX_MESSAGE_QUEUE_MP_EXTRACT_PROXY = 2, - POSIX_MESSAGE_QUEUE_MP_OBTAIN_REQUEST = 3, - POSIX_MESSAGE_QUEUE_MP_OBTAIN_RESPONSE = 4, - POSIX_MESSAGE_QUEUE_MP_RELEASE_REQUEST = 5, - POSIX_MESSAGE_QUEUE_MP_RELEASE_RESPONSE = 6, -} POSIX_Message_queue_MP_Remote_operations; - -/* - * The following data structure defines the packet used to perform - * remote message queue operations. - */ - -typedef struct { - MP_packet_Prefix Prefix; - POSIX_Message_queue_MP_Remote_operations operation; - Objects_Name name; - boolean wait; /* XXX options */ - Objects_Id proxy_id; -} POSIX_Message_queue_MP_Packet; - -/* - * _POSIX_Message_queue_MP_Send_process_packet - * - * DESCRIPTION: - * - * This routine performs a remote procedure call so that a - * process operation can be performed on another node. - */ - -void _POSIX_Message_queue_MP_Send_process_packet ( - POSIX_Message_queue_MP_Remote_operations operation, - Objects_Id mq_id, - Objects_Name name, - Objects_Id proxy_id -); - -/* - * _POSIX_Message_queue_MP_Send_request_packet - * - * DESCRIPTION: - * - * This routine performs a remote procedure call so that a - * directive operation can be initiated on another node. - */ - -int _POSIX_Message_queue_MP_Send_request_packet ( - POSIX_Message_queue_MP_Remote_operations operation, - Objects_Id mq_id, - boolean wait, /* XXX options */ - Watchdog_Interval timeout -); - -/* - * _POSIX_Message_queue_MP_Send_response_packet - * - * DESCRIPTION: - * - * This routine performs a remote procedure call so that a - * directive can be performed on another node. - */ - -void _POSIX_Message_queue_MP_Send_response_packet ( - POSIX_Message_queue_MP_Remote_operations operation, - Objects_Id mq_id, - Thread_Control *the_thread -); - -/* - * - * _POSIX_Message_queue_MP_Process_packet - * - * DESCRIPTION: - * - * This routine performs the actions specific to this package for - * the request from another node. - */ - -void _POSIX_Message_queue_MP_Process_packet ( - MP_packet_Prefix *the_packet_prefix -); - -/* - * _POSIX_Message_queue_MP_Send_object_was_deleted - * - * DESCRIPTION: - * - * This routine is invoked indirectly by the thread queue - * when a proxy has been removed from the thread queue and - * the remote node must be informed of this. - */ - -void _POSIX_Message_queue_MP_Send_object_was_deleted ( - Thread_Control *the_proxy -); - -/* - * _POSIX_Message_queue_MP_Send_extract_proxy - * - * DESCRIPTION: - * - * This routine is invoked when a task is deleted and it - * has a proxy which must be removed from a thread queue and - * the remote node must be informed of this. - */ - -void _POSIX_Message_queue_MP_Send_extract_proxy ( - Thread_Control *the_thread -); - -/* - * _POSIX_Message_queue_MP_Get_packet - * - * DESCRIPTION: - * - * This function is used to obtain a message queue mp packet. - */ - -POSIX_Message_queue_MP_Packet *_POSIX_Message_queue_MP_Get_packet ( void ); - -#ifdef __cplusplus -} -#endif - -#endif -/* end of file */ diff --git a/c/src/exec/posix/headers/mutex.h b/c/src/exec/posix/headers/mutex.h deleted file mode 100644 index b0d9526dd5..0000000000 --- a/c/src/exec/posix/headers/mutex.h +++ /dev/null @@ -1,122 +0,0 @@ -/* rtems/posix/mutex.h - * - * This include file contains all the private support information for - * POSIX mutex's. - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#ifndef __RTEMS_POSIX_MUTEX_h -#define __RTEMS_POSIX_MUTEX_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -/* - * Data Structure used to manage a POSIX mutex - */ - -typedef struct { - Objects_Control Object; - int process_shared; - CORE_mutex_Control Mutex; -} POSIX_Mutex_Control; - -/* - * The following defines the information control block used to manage - * this class of objects. - */ - -POSIX_EXTERN Objects_Information _POSIX_Mutex_Information; - -/* - * _POSIX_Mutex_Manager_initialization - * - * DESCRIPTION: - * - * This routine performs the initialization necessary for this manager. - */ - -void _POSIX_Mutex_Manager_initialization( - unsigned32 maximum_mutexes -); - -/* - * _POSIX_Mutex_Allocate - * - * DESCRIPTION: - * - * This function allocates a mutexes control block from - * the inactive chain of free mutexes control blocks. - */ - -RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Allocate( void ); - -/* - * _POSIX_Mutex_Free - * - * DESCRIPTION: - * - * This routine frees a mutexes control block to the - * inactive chain of free mutexes control blocks. - */ - -RTEMS_INLINE_ROUTINE void _POSIX_Mutex_Free ( - POSIX_Mutex_Control *the_mutex -); - -/* - * _POSIX_Mutex_Get - * - * DESCRIPTION: - * - * This function maps mutexes IDs to mutexes control blocks. - * If ID corresponds to a local mutexes, then it returns - * the_mutex control pointer which maps to ID and location - * is set to OBJECTS_LOCAL. if the mutexes ID is global and - * resides on a remote node, then location is set to OBJECTS_REMOTE, - * and the_mutex is undefined. Otherwise, location is set - * to OBJECTS_ERROR and the_mutex is undefined. - */ - -RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Get ( - Objects_Id *id, - Objects_Locations *location -); - -/* - * _POSIX_Mutex_Is_null - * - * DESCRIPTION: - * - * This function returns TRUE if the_mutex is NULL and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _POSIX_Mutex_Is_null ( - POSIX_Mutex_Control *the_mutex -); - -#include -#if defined(RTEMS_MULTIPROCESSING) -#include -#endif - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ - diff --git a/c/src/exec/posix/headers/mutexmp.h b/c/src/exec/posix/headers/mutexmp.h deleted file mode 100644 index 71f60677eb..0000000000 --- a/c/src/exec/posix/headers/mutexmp.h +++ /dev/null @@ -1,161 +0,0 @@ -/* mutexmp.h - * - * This include file contains all the constants and structures associated - * with the Multiprocessing Support in the POSIX Mutex Manager. - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#ifndef __RTEMS_POSIX_MUTEX_MP_h -#define __RTEMS_POSIX_MUTEX_MP_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include -#include - -/* - * The following enumerated type defines the list of - * remote mutex operations. - */ - -typedef enum { - POSIX_MUTEX_MP_ANNOUNCE_CREATE = 0, - POSIX_MUTEX_MP_ANNOUNCE_DELETE = 1, - POSIX_MUTEX_MP_EXTRACT_PROXY = 2, - POSIX_MUTEX_MP_OBTAIN_REQUEST = 3, - POSIX_MUTEX_MP_OBTAIN_RESPONSE = 4, - POSIX_MUTEX_MP_RELEASE_REQUEST = 5, - POSIX_MUTEX_MP_RELEASE_RESPONSE = 6, -} POSIX_Mutex_MP_Remote_operations; - -/* - * The following data structure defines the packet used to perform - * remote mutex operations. - */ - -typedef struct { - MP_packet_Prefix Prefix; - POSIX_Mutex_MP_Remote_operations operation; - Objects_Name name; - boolean wait; /* XXX options */ - Objects_Id proxy_id; -} POSIX_Mutex_MP_Packet; - -/* - * _POSIX_Mutex_MP_Send_process_packet - * - * DESCRIPTION: - * - * This routine performs a remote procedure call so that a - * process operation can be performed on another node. - */ - -void _POSIX_Mutex_MP_Send_process_packet ( - POSIX_Mutex_MP_Remote_operations operation, - Objects_Id mutex_id, - Objects_Name name, - Objects_Id proxy_id -); - -/* - * _POSIX_Mutex_MP_Send_request_packet - * - * DESCRIPTION: - * - * This routine performs a remote procedure call so that a - * directive operation can be initiated on another node. - */ - -int _POSIX_Mutex_MP_Send_request_packet ( - POSIX_Mutex_MP_Remote_operations operation, - Objects_Id mutex_id, - boolean wait, /* XXX options */ - Watchdog_Interval timeout -); - -/* - * _POSIX_Mutex_MP_Send_response_packet - * - * DESCRIPTION: - * - * This routine performs a remote procedure call so that a - * directive can be performed on another node. - */ - -void _POSIX_Mutex_MP_Send_response_packet ( - POSIX_Mutex_MP_Remote_operations operation, - Objects_Id mutex_id, - Thread_Control *the_thread -); - -/* - * - * _POSIX_Mutex_MP_Process_packet - * - * DESCRIPTION: - * - * This routine performs the actions specific to this package for - * the request from another node. - */ - -void _POSIX_Mutex_MP_Process_packet ( - MP_packet_Prefix *the_packet_prefix -); - -/* - * _POSIX_Mutex_MP_Send_object_was_deleted - * - * DESCRIPTION: - * - * This routine is invoked indirectly by the thread queue - * when a proxy has been removed from the thread queue and - * the remote node must be informed of this. - */ - -void _POSIX_Mutex_MP_Send_object_was_deleted ( - Thread_Control *the_proxy -); - -/* - * _POSIX_Mutex_MP_Send_extract_proxy - * - * DESCRIPTION: - * - * This routine is invoked when a task is deleted and it - * has a proxy which must be removed from a thread queue and - * the remote node must be informed of this. - */ - -void _POSIX_Mutex_MP_Send_extract_proxy ( - Thread_Control *the_thread -); - -/* - * _POSIX_Mutex_MP_Get_packet - * - * DESCRIPTION: - * - * This function is used to obtain a mutex mp packet. - */ - -POSIX_Mutex_MP_Packet *_POSIX_Mutex_MP_Get_packet ( void ); - -#ifdef __cplusplus -} -#endif - -#endif -/* end of file */ diff --git a/c/src/exec/posix/headers/posixapi.h b/c/src/exec/posix/headers/posixapi.h deleted file mode 100644 index f7c52985c3..0000000000 --- a/c/src/exec/posix/headers/posixapi.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * POSIX API Support - * - * NOTE: - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#ifndef __POSIX_API_h -#define __POSIX_API_h - -#include - -/*PAGE - * - * _POSIX_API_Initialize - * - * XXX - */ - -void _POSIX_API_Initialize( - rtems_configuration_table *configuration_table -); - -#endif -/* end of include file */ diff --git a/c/src/exec/posix/headers/priority.h b/c/src/exec/posix/headers/priority.h deleted file mode 100644 index c0253f3bab..0000000000 --- a/c/src/exec/posix/headers/priority.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * - * - * $Id$ - */ - -#ifndef __RTEMS_POSIX_PRIORITY_h -#define __RTEMS_POSIX_PRIORITY_h - -#include - -/* - * 1003.1b-1993,2.2.2.80 definition of priority, p. 19 - * - * "Numericallly higher values represent higher priorities." - * - * Thus, RTEMS Core has priorities run in the opposite sense of the POSIX API. - * - * There are only 254 posix priority levels since a task at priority level - * 255 would never run because of the RTEMS idle task. This is necessary - * because GNAT maps the lowest Ada task priority to the lowest thread - * priority. The lowest priority Ada task should get to run, so there is - * a fundamental conflict with having 255 priorities. - */ - -#define POSIX_SCHEDULER_MAXIMUM_PRIORITY (254) - -#define POSIX_SCHEDULER_MINIMUM_PRIORITY (1) - -RTEMS_INLINE_ROUTINE boolean _POSIX_Priority_Is_valid( - int priority -); - -RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( - int priority -); - -RTEMS_INLINE_ROUTINE int _POSIX_Priority_From_core( - Priority_Control priority -); - -#include - -#endif diff --git a/c/src/exec/posix/headers/psignal.h b/c/src/exec/posix/headers/psignal.h deleted file mode 100644 index 4ecba1f41c..0000000000 --- a/c/src/exec/posix/headers/psignal.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - * $Id$ - */ - -#ifndef __RTEMS_POSIX_SIGNALS_h -#define __RTEMS_POSIX_SIGNALS_h - -typedef struct { - Chain_Node Node; - siginfo_t Info; -} POSIX_signals_Siginfo_node; - -void _POSIX_signals_Manager_Initialization( - int maximum_queued_signals -); - -void _POSIX_signals_Post_switch_extension( - Thread_Control *the_thread -); - -#endif -/* end of file */ diff --git a/c/src/exec/posix/headers/pthread.h b/c/src/exec/posix/headers/pthread.h deleted file mode 100644 index 46e5834385..0000000000 --- a/c/src/exec/posix/headers/pthread.h +++ /dev/null @@ -1,125 +0,0 @@ -/* rtems/posix/pthread.h - * - * This include file contains all the private support information for - * POSIX threads. - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#ifndef __RTEMS_POSIX_THREADS_h -#define __RTEMS_POSIX_THREADS_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -#define PTHREAD_MINIMUM_STACK_SIZE (STACK_MINIMUM_SIZE * 2) - -/* - * The following defines the information control block used to manage - * this class of objects. - */ - -POSIX_EXTERN Objects_Information _POSIX_Threads_Information; - -/* - * These are used to manage the user initialization threads. - */ - -POSIX_EXTERN posix_initialization_threads_table - *_POSIX_Threads_User_initialization_threads; -POSIX_EXTERN unsigned32 _POSIX_Threads_Number_of_initialization_threads; - - -/* - * _POSIX_Threads_Manager_initialization - * - * DESCRIPTION: - * - * This routine performs the initialization necessary for this manager. - */ - -void _POSIX_Threads_Manager_initialization( - unsigned32 maximum_pthreads, - unsigned32 number_of_initialization_threads, - posix_initialization_threads_table *user_threads -); - -/* - * _POSIX_Threads_Allocate - * - * DESCRIPTION: - * - * This function allocates a pthread control block from - * the inactive chain of free pthread control blocks. - */ - -RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void ); - -/* - * _POSIX_Threads_Free - * - * DESCRIPTION: - * - * This routine frees a pthread control block to the - * inactive chain of free pthread control blocks. - */ - -RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free( - Thread_Control *the_pthread -); - -/* - * _POSIX_Threads_Get - * - * DESCRIPTION: - * - * This function maps pthread IDs to pthread control blocks. - * If ID corresponds to a local pthread, then it returns - * the_pthread control pointer which maps to ID and location - * is set to OBJECTS_LOCAL. if the pthread ID is global and - * resides on a remote node, then location is set to OBJECTS_REMOTE, - * and the_pthread is undefined. Otherwise, location is set - * to OBJECTS_ERROR and the_pthread is undefined. - */ - -RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get( - pthread_t id, - Objects_Locations *location -); - -/* - * _POSIX_Threads_Is_null - * - * DESCRIPTION: - * - * This function returns TRUE if the_pthread is NULL and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _POSIX_Threads_Is_null( - Thread_Control *the_pthread -); - -#include -#if defined(RTEMS_MULTIPROCESSING) -#include -#endif - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ - diff --git a/c/src/exec/posix/headers/pthreadmp.h b/c/src/exec/posix/headers/pthreadmp.h deleted file mode 100644 index af5997ead7..0000000000 --- a/c/src/exec/posix/headers/pthreadmp.h +++ /dev/null @@ -1,161 +0,0 @@ -/* pthreadmp.h - * - * This include file contains all the constants and structures associated - * with the Multiprocessing Support in the POSIX Threads Manager. - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#ifndef __RTEMS_POSIX_THREADS_MP_h -#define __RTEMS_POSIX_THREADS_MP_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include -#include - -/* - * The following enumerated type defines the list of - * remote pthread operations. - */ - -typedef enum { - POSIX_THREADS_MP_ANNOUNCE_CREATE = 0, - POSIX_THREADS_MP_ANNOUNCE_DELETE = 1, - POSIX_THREADS_MP_EXTRACT_PROXY = 2, - POSIX_THREADS_MP_OBTAIN_REQUEST = 3, - POSIX_THREADS_MP_OBTAIN_RESPONSE = 4, - POSIX_THREADS_MP_RELEASE_REQUEST = 5, - POSIX_THREADS_MP_RELEASE_RESPONSE = 6 -} POSIX_Threads_MP_Remote_operations; - -/* - * The following data structure defines the packet used to perform - * remote pthread operations. - */ - -typedef struct { - MP_packet_Prefix Prefix; - POSIX_Threads_MP_Remote_operations operation; - Objects_Name name; - boolean wait; - Objects_Id proxy_id; -} POSIX_Threads_MP_Packet; - -/* - * _POSIX_Threads_MP_Send_process_packet - * - * DESCRIPTION: - * - * This routine performs a remote procedure call so that a - * process operation can be performed on another node. - */ - -void _POSIX_Threads_MP_Send_process_packet ( - POSIX_Threads_MP_Remote_operations operation, - Objects_Id pthread_id, - Objects_Name name, - Objects_Id proxy_id -); - -/* - * _POSIX_Threads_MP_Send_request_packet - * - * DESCRIPTION: - * - * This routine performs a remote procedure call so that a - * directive operation can be initiated on another node. - */ - -int _POSIX_Threads_MP_Send_request_packet ( - POSIX_Threads_MP_Remote_operations operation, - Objects_Id pthread_id, - boolean wait, - Watchdog_Interval timeout -); - -/* - * _POSIX_Threads_MP_Send_response_packet - * - * DESCRIPTION: - * - * This routine performs a remote procedure call so that a - * directive can be performed on another node. - */ - -void _POSIX_Threads_MP_Send_response_packet ( - POSIX_Threads_MP_Remote_operations operation, - Objects_Id pthread_id, - Thread_Control *the_thread -); - -/* - * - * _POSIX_Threads_MP_Process_packet - * - * DESCRIPTION: - * - * This routine performs the actions specific to this package for - * the request from another node. - */ - -void _POSIX_Threads_MP_Process_packet ( - MP_packet_Prefix *the_packet_prefix -); - -/* - * _POSIX_Threads_MP_Send_object_was_deleted - * - * DESCRIPTION: - * - * This routine is invoked indirectly by the thread queue - * when a proxy has been removed from the thread queue and - * the remote node must be informed of this. - */ - -void _POSIX_Threads_MP_Send_object_was_deleted ( - Thread_Control *the_proxy -); - -/* - * _POSIX_Threads_MP_Send_extract_proxy - * - * DESCRIPTION: - * - * This routine is invoked when a task is deleted and it - * has a proxy which must be removed from a thread queue and - * the remote node must be informed of this. - */ - -void _POSIX_Threads_MP_Send_extract_proxy ( - Thread_Control *the_thread -); - -/* - * _POSIX_Threads_MP_Get_packet - * - * DESCRIPTION: - * - * This function is used to obtain a pthread mp packet. - */ - -POSIX_Threads_MP_Packet *_POSIX_Threads_MP_Get_packet ( void ); - -#ifdef __cplusplus -} -#endif - -#endif -/* end of file */ diff --git a/c/src/exec/posix/headers/semaphore.h b/c/src/exec/posix/headers/semaphore.h deleted file mode 100644 index aaf0c4b898..0000000000 --- a/c/src/exec/posix/headers/semaphore.h +++ /dev/null @@ -1,137 +0,0 @@ -/* rtems/posix/semaphore.h - * - * This include file contains all the private support information for - * POSIX Semaphores. - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#ifndef __RTEMS_POSIX_SEMAPHORE_h -#define __RTEMS_POSIX_SEMAPHORE_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -/* - * Data Structure used to manage a POSIX semaphore - */ - -typedef struct { - Objects_Control Object; - int process_shared; - boolean named; - boolean linked; - unsigned32 open_count; - CORE_semaphore_Control Semaphore; -} POSIX_Semaphore_Control; - -/* - * The following defines the information control block used to manage - * this class of objects. - */ - -POSIX_EXTERN Objects_Information _POSIX_Semaphore_Information; - -/* - * _POSIX_Semaphore_Manager_initialization - * - * DESCRIPTION: - * - * This routine performs the initialization necessary for this manager. - */ - -void _POSIX_Semaphore_Manager_initialization( - unsigned32 maximum_semaphorees -); - -/* - * _POSIX_Semaphore_Allocate - * - * DESCRIPTION: - * - * This function allocates a semaphore control block from - * the inactive chain of free semaphore control blocks. - */ - -RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void ); - -/* - * _POSIX_Semaphore_Free - * - * DESCRIPTION: - * - * This routine frees a semaphore control block to the - * inactive chain of free semaphore control blocks. - */ - -RTEMS_INLINE_ROUTINE void _POSIX_Semaphore_Free ( - POSIX_Semaphore_Control *the_semaphore -); - -/* - * _POSIX_Semaphore_Get - * - * DESCRIPTION: - * - * This function maps semaphore IDs to semaphore control blocks. - * If ID corresponds to a local semaphore, then it returns - * the_semaphore control pointer which maps to ID and location - * is set to OBJECTS_LOCAL. if the semaphore ID is global and - * resides on a remote node, then location is set to OBJECTS_REMOTE, - * and the_semaphore is undefined. Otherwise, location is set - * to OBJECTS_ERROR and the_semaphore is undefined. - */ - -RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get ( - Objects_Id *id, - Objects_Locations *location -); - -/* - * _POSIX_Semaphore_Is_null - * - * DESCRIPTION: - * - * This function returns TRUE if the_semaphore is NULL and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _POSIX_Semaphore_Is_null ( - POSIX_Semaphore_Control *the_semaphore -); - -/* - * _POSIX_Semaphore_Name_to_id - * - * DESCRIPTION: - * - * XXX - */ - -int _POSIX_Semaphore_Name_to_id( - const char *name, - Objects_Id *id -); - -#include -#if defined(RTEMS_MULTIPROCESSING) -#include -#endif - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ - diff --git a/c/src/exec/posix/headers/semaphoremp.h b/c/src/exec/posix/headers/semaphoremp.h deleted file mode 100644 index 14af483f98..0000000000 --- a/c/src/exec/posix/headers/semaphoremp.h +++ /dev/null @@ -1,161 +0,0 @@ -/* semaphoremp.h - * - * This include file contains all the constants and structures associated - * with the Multiprocessing Support in the POSIX Semaphore Manager. - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#ifndef __RTEMS_POSIX_SEMAPHORE_MP_h -#define __RTEMS_POSIX_SEMAPHORE_MP_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include -#include - -/* - * The following enumerated type defines the list of - * remote semaphore operations. - */ - -typedef enum { - POSIX_SEMAPHORE_MP_ANNOUNCE_CREATE = 0, - POSIX_SEMAPHORE_MP_ANNOUNCE_DELETE = 1, - POSIX_SEMAPHORE_MP_EXTRACT_PROXY = 2, - POSIX_SEMAPHORE_MP_OBTAIN_REQUEST = 3, - POSIX_SEMAPHORE_MP_OBTAIN_RESPONSE = 4, - POSIX_SEMAPHORE_MP_RELEASE_REQUEST = 5, - POSIX_SEMAPHORE_MP_RELEASE_RESPONSE = 6, -} POSIX_Semaphore_MP_Remote_operations; - -/* - * The following data structure defines the packet used to perform - * remote semaphore operations. - */ - -typedef struct { - MP_packet_Prefix Prefix; - POSIX_Semaphore_MP_Remote_operations operation; - Objects_Name name; - boolean wait; /* XXX options */ - Objects_Id proxy_id; -} POSIX_Semaphore_MP_Packet; - -/* - * _POSIX_Semaphore_MP_Send_process_packet - * - * DESCRIPTION: - * - * This routine performs a remote procedure call so that a - * process operation can be performed on another node. - */ - -void _POSIX_Semaphore_MP_Send_process_packet ( - POSIX_Semaphore_MP_Remote_operations operation, - Objects_Id semaphore_id, - Objects_Name name, - Objects_Id proxy_id -); - -/* - * _POSIX_Semaphore_MP_Send_request_packet - * - * DESCRIPTION: - * - * This routine performs a remote procedure call so that a - * directive operation can be initiated on another node. - */ - -int _POSIX_Semaphore_MP_Send_request_packet ( - POSIX_Semaphore_MP_Remote_operations operation, - Objects_Id semaphore_id, - boolean wait, /* XXX options */ - Watchdog_Interval timeout -); - -/* - * _POSIX_Semaphore_MP_Send_response_packet - * - * DESCRIPTION: - * - * This routine performs a remote procedure call so that a - * directive can be performed on another node. - */ - -void _POSIX_Semaphore_MP_Send_response_packet ( - POSIX_Semaphore_MP_Remote_operations operation, - Objects_Id semaphore_id, - Thread_Control *the_thread -); - -/* - * - * _POSIX_Semaphore_MP_Process_packet - * - * DESCRIPTION: - * - * This routine performs the actions specific to this package for - * the request from another node. - */ - -void _POSIX_Semaphore_MP_Process_packet ( - MP_packet_Prefix *the_packet_prefix -); - -/* - * _POSIX_Semaphore_MP_Send_object_was_deleted - * - * DESCRIPTION: - * - * This routine is invoked indirectly by the thread queue - * when a proxy has been removed from the thread queue and - * the remote node must be informed of this. - */ - -void _POSIX_Semaphore_MP_Send_object_was_deleted ( - Thread_Control *the_proxy -); - -/* - * _POSIX_Semaphore_MP_Send_extract_proxy - * - * DESCRIPTION: - * - * This routine is invoked when a task is deleted and it - * has a proxy which must be removed from a thread queue and - * the remote node must be informed of this. - */ - -void _POSIX_Semaphore_MP_Send_extract_proxy ( - Thread_Control *the_thread -); - -/* - * _POSIX_Semaphore_MP_Get_packet - * - * DESCRIPTION: - * - * This function is used to obtain a semaphore mp packet. - */ - -POSIX_Semaphore_MP_Packet *_POSIX_Semaphore_MP_Get_packet ( void ); - -#ifdef __cplusplus -} -#endif - -#endif -/* end of file */ diff --git a/c/src/exec/posix/headers/seterr.h b/c/src/exec/posix/headers/seterr.h deleted file mode 100644 index 85311cfd8c..0000000000 --- a/c/src/exec/posix/headers/seterr.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#ifndef __POSIX_SET_ERRNO_h -#define __POSIX_SET_ERRNO_h - -#define set_errno_and_return_minus_one( _error ) \ - { errno = (_error); return -1; } - -#endif -/* end of include file */ diff --git a/c/src/exec/posix/headers/threadsup.h b/c/src/exec/posix/headers/threadsup.h deleted file mode 100644 index bb800a507f..0000000000 --- a/c/src/exec/posix/headers/threadsup.h +++ /dev/null @@ -1,46 +0,0 @@ -/* threadsup.h - * - * $Id$ - */ - -#ifndef __RTEMS_POSIX_THREAD_SUPPORT_h -#define __RTEMS_POSIX_THREAD_SUPPORT_h - -#include -#include - -typedef struct { - pthread_attr_t Attributes; - int detachstate; - Thread_queue_Control Join_List; - int schedpolicy; - struct sched_param schedparam; - int ss_high_priority; - Watchdog_Control Sporadic_timer; - - sigset_t signals_blocked; - sigset_t signals_pending; - -#if 0 - /* - * POSIX Interrupts - */ - unsigned32 interrupts_installed; - CORE_semaphore_Control Interrupt_Semaphore; -#endif - -#if 0 - /* - * POSIX Cancelability - */ - int cancelability_state; - int cancelability_type; - int cancelation_requested; - Chain_Control Cancellation_Handlers; -#endif - -} POSIX_API_Control; - -#endif -/* end of include file */ - diff --git a/c/src/exec/posix/headers/time.h b/c/src/exec/posix/headers/time.h deleted file mode 100644 index 0e87db388e..0000000000 --- a/c/src/exec/posix/headers/time.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * - * - * $Id$ - */ - -#ifndef __RTEMS_POSIX_TIME_h -#define __RTEMS_POSIX_TIME_h - -#include - -/* - * Seconds from January 1, 1970 to January 1, 1988. Used to account for - * differences between POSIX API and RTEMS core. - */ - -#define POSIX_TIME_SECONDS_1970_THROUGH_1988 \ - (((1987 - 1970 + 1) * TOD_SECONDS_PER_NON_LEAP_YEAR) + \ - (4 * TOD_SECONDS_PER_DAY)) - -/*PAGE - * - * _POSIX_Timespec_subtract - */ - -void _POSIX_Timespec_subtract( - const struct timespec *the_start, - const struct timespec *end, - struct timespec *result -); - -/* - * _POSIX_Timespec_to_interval - */ - -Watchdog_Interval _POSIX_Timespec_to_interval( - const struct timespec *time -); - -/*PAGE - * - * _POSIX_Interval_to_timespec - */ - -void _POSIX_Interval_to_timespec( - Watchdog_Interval ticks, - struct timespec *time -); - -#endif diff --git a/c/src/exec/posix/inline/Makefile.in b/c/src/exec/posix/inline/Makefile.in deleted file mode 100644 index 0b0d64d1ef..0000000000 --- a/c/src/exec/posix/inline/Makefile.in +++ /dev/null @@ -1,31 +0,0 @@ -# -# $Id$ -# - -@SET_MAKE@ -srcdir = @srcdir@ -VPATH = @srcdir@ -RTEMS_ROOT = @top_srcdir@ -PROJECT_ROOT = @PROJECT_ROOT@ - -#I_PIECES= cond intr key mqueue mutex pthread priority semaphore -I_PIECES=cond key mutex pthread priority -I_FILES=$(I_PIECES:%=$(srcdir)/%.inl) - -SRCS=$(I_FILES) - -include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg -include $(RTEMS_ROOT)/make/leaf.cfg - -# -# Add your list of files to delete here. The config files -# already know how to delete some stuff, so you may want -# to just run 'make clean' first to see what gets missed. -# 'make clobber' already includes 'make clean' -# - -CLEAN_ADDITIONS += -CLOBBER_ADDITIONS += - -all: $(SRCS) - $(INSTALL) -m 444 ${I_FILES} $(PROJECT_INCLUDE)/rtems/posix diff --git a/c/src/exec/posix/inline/cond.inl b/c/src/exec/posix/inline/cond.inl deleted file mode 100644 index 3a6741b1b8..0000000000 --- a/c/src/exec/posix/inline/cond.inl +++ /dev/null @@ -1,77 +0,0 @@ -/* rtems/posix/cond.inl - * - * This include file contains the static inline implementation of the private - * inlined routines for POSIX condition variables. - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#ifndef __RTEMS_POSIX_CONDITION_VARIABLES_inl -#define __RTEMS_POSIX_CONDITION_VARIABLES_inl - -/*PAGE - * - * _POSIX_Condition_variables_Allocate - */ - -RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control - *_POSIX_Condition_variables_Allocate( void ) -{ - return (POSIX_Condition_variables_Control *) - _Objects_Allocate( &_POSIX_Condition_variables_Information ); -} - -/*PAGE - * - * _POSIX_Condition_variables_Free - */ - -RTEMS_INLINE_ROUTINE void _POSIX_Condition_variables_Free ( - POSIX_Condition_variables_Control *the_condition_variable -) -{ - _Objects_Free( - &_POSIX_Condition_variables_Information, - &the_condition_variable->Object - ); -} - -/*PAGE - * - * _POSIX_Condition_variables_Get - */ - -RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get ( - Objects_Id *id, - Objects_Locations *location -) -{ -/* XXX really should validate pointer */ -/* XXX should support COND_INITIALIZER */ - return (POSIX_Condition_variables_Control *) - _Objects_Get( &_POSIX_Condition_variables_Information, *id, location ); -} - -/*PAGE - * - * _POSIX_Condition_variables_Is_null - */ - -RTEMS_INLINE_ROUTINE boolean _POSIX_Condition_variables_Is_null ( - POSIX_Condition_variables_Control *the_condition_variable -) -{ - return !the_condition_variable; -} - -#endif -/* end of include file */ - diff --git a/c/src/exec/posix/inline/intr.inl b/c/src/exec/posix/inline/intr.inl deleted file mode 100644 index d084a1d12a..0000000000 --- a/c/src/exec/posix/inline/intr.inl +++ /dev/null @@ -1,72 +0,0 @@ -/* rtems/posix/intr.inl - * - * This include file contains the static inline implementation of the private - * inlined routines for POSIX Interrupt Manager - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#ifndef __RTEMS_POSIX_INTERRUPT_inl -#define __RTEMS_POSIX_INTERRUPT_inl - -/*PAGE - * - * _POSIX_Interrupt_Allocate - */ - -RTEMS_INLINE_ROUTINE POSIX_Interrupt_Handler_control * - _POSIX_Interrupt_Allocate( void ) -{ - return (POSIX_Interrupt_Handler_control *) - _Objects_Allocate( &_POSIX_Interrupt_Handlers_Information ); -} - -/*PAGE - * - * _POSIX_Interrupt_Free - */ - -RTEMS_INLINE_ROUTINE void _POSIX_Interrupt_Free ( - POSIX_Interrupt_Handler_control *the_intr -) -{ - _Objects_Free( &_POSIX_Interrupt_Handlers_Information, &the_intr->Object ); -} - -/*PAGE - * - * _POSIX_Interrupt_Get - */ - -RTEMS_INLINE_ROUTINE POSIX_Interrupt_Control *_POSIX_Interrupt_Get ( - Objects_Id id, - Objects_Locations *location -) -{ - return (POSIX_Interrupt_Control *) - _Objects_Get( &_POSIX_Interrupt_Handlers_Information, id, location ); -} - -/*PAGE - * - * _POSIX_Interrupt_Is_null - */ - -RTEMS_INLINE_ROUTINE boolean _POSIX_Interrupt_Is_null ( - POSIX_Interrupt_Handler_control *the_intr -) -{ - return !the_intr; -} - -#endif -/* end of include file */ - diff --git a/c/src/exec/posix/inline/key.inl b/c/src/exec/posix/inline/key.inl deleted file mode 100644 index fa4d31b11f..0000000000 --- a/c/src/exec/posix/inline/key.inl +++ /dev/null @@ -1,70 +0,0 @@ -/* rtems/posix/key.inl - * - * This include file contains the static inline implementation of the private - * inlined routines for POSIX key's. - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#ifndef __RTEMS_POSIX_KEY_inl -#define __RTEMS_POSIX_KEY_inl - -/*PAGE - * - * _POSIX_Keys_Allocate - */ - -RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Allocate( void ) -{ - return (POSIX_Keys_Control *) _Objects_Allocate( &_POSIX_Keys_Information ); -} - -/*PAGE - * - * _POSIX_Keys_Free - */ - -RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free ( - POSIX_Keys_Control *the_key -) -{ - _Objects_Free( &_POSIX_Keys_Information, &the_key->Object ); -} - -/*PAGE - * - * _POSIX_Keys_Get - */ - -RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Get ( - Objects_Id id, - Objects_Locations *location -) -{ - return (POSIX_Keys_Control *) - _Objects_Get( &_POSIX_Keys_Information, id, location ); -} - -/*PAGE - * - * _POSIX_Keys_Is_null - */ - -RTEMS_INLINE_ROUTINE boolean _POSIX_Keys_Is_null ( - POSIX_Keys_Control *the_key -) -{ - return !the_key; -} - -#endif -/* end of include file */ - diff --git a/c/src/exec/posix/inline/mqueue.inl b/c/src/exec/posix/inline/mqueue.inl deleted file mode 100644 index 51326fba7b..0000000000 --- a/c/src/exec/posix/inline/mqueue.inl +++ /dev/null @@ -1,83 +0,0 @@ -/* rtems/posix/mqueue.inl - * - * This include file contains the static inline implementation of the private - * inlined routines for POSIX Message Queue. - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#ifndef __RTEMS_POSIX_MESSAGE_QUEUE_inl -#define __RTEMS_POSIX_MESSAGE_QUEUE_inl - -/*PAGE - * - * _POSIX_Message_queue_Allocate - */ - -RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Allocate( void ) -{ - return (POSIX_Message_queue_Control *) - _Objects_Allocate( &_POSIX_Message_queue_Information ); -} - -/*PAGE - * - * _POSIX_Message_queue_Free - */ - -RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free ( - POSIX_Message_queue_Control *the_mq -) -{ - _Objects_Free( &_POSIX_Message_queue_Information, &the_mq->Object ); -} - -/*PAGE - * - * _POSIX_Message_queue_Get - */ - -RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Get ( - Objects_Id id, - Objects_Locations *location -) -{ - return (POSIX_Message_queue_Control *) - _Objects_Get( &_POSIX_Message_queue_Information, id, location ); -} - -/*PAGE - * - * _POSIX_Message_queue_Is_null - */ - -RTEMS_INLINE_ROUTINE boolean _POSIX_Message_queue_Is_null ( - POSIX_Message_queue_Control *the_mq -) -{ - return !the_mq; -} - -/*PAGE - * - * _POSIX_Message_queue_Priority_to_core - */ - -RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Message_queue_Priority_to_core( - unsigned int priority -) -{ - return priority; -} - -#endif -/* end of include file */ - diff --git a/c/src/exec/posix/inline/mutex.inl b/c/src/exec/posix/inline/mutex.inl deleted file mode 100644 index 5c1f3b7b73..0000000000 --- a/c/src/exec/posix/inline/mutex.inl +++ /dev/null @@ -1,93 +0,0 @@ -/* rtems/posix/mutex.inl - * - * This include file contains the static inline implementation of the private - * inlined routines for POSIX mutex's. - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#ifndef __RTEMS_POSIX_MUTEX_inl -#define __RTEMS_POSIX_MUTEX_inl - -/*PAGE - * - * _POSIX_Mutex_Allocate - */ - -RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Allocate( void ) -{ - return (POSIX_Mutex_Control *) _Objects_Allocate( &_POSIX_Mutex_Information ); -} - -/*PAGE - * - * _POSIX_Mutex_Free - */ - -RTEMS_INLINE_ROUTINE void _POSIX_Mutex_Free ( - POSIX_Mutex_Control *the_mutex -) -{ - _Objects_Free( &_POSIX_Mutex_Information, &the_mutex->Object ); -} - -/*PAGE - * - * _POSIX_Mutex_Get - */ - -RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Get ( - Objects_Id *id, - Objects_Locations *location -) -{ - int status; - - if ( !id ) { - *location = OBJECTS_ERROR; - return (POSIX_Mutex_Control *) 0; - } - - if ( *id == PTHREAD_MUTEX_INITIALIZER ) { - /* - * Do an "auto-create" here. - */ - - status = pthread_mutex_init( id, 0 ); - if ( status ) { - *location = OBJECTS_ERROR; - return (POSIX_Mutex_Control *) 0; - } - } - - /* - * Now call Objects_Get() - */ - - return (POSIX_Mutex_Control *) - _Objects_Get( &_POSIX_Mutex_Information, *id, location ); -} - -/*PAGE - * - * _POSIX_Mutex_Is_null - */ - -RTEMS_INLINE_ROUTINE boolean _POSIX_Mutex_Is_null ( - POSIX_Mutex_Control *the_mutex -) -{ - return !the_mutex; -} - -#endif -/* end of include file */ - diff --git a/c/src/exec/posix/inline/priority.inl b/c/src/exec/posix/inline/priority.inl deleted file mode 100644 index dc8187d4ef..0000000000 --- a/c/src/exec/posix/inline/priority.inl +++ /dev/null @@ -1,37 +0,0 @@ -/* - * $Id$ - */ - -#ifndef __RTEMS_POSIX_PRIORITY_inl -#define __RTEMS_POSIX_PRIORITY_inl - -/* - * 1003.1b-1993,2.2.2.80 definition of priority, p. 19 - * - * "Numericallly higher values represent higher priorities." - * - * Thus, RTEMS Core has priorities run in the opposite sense of the POSIX API. - */ - -RTEMS_INLINE_ROUTINE boolean _POSIX_Priority_Is_valid( - int priority -) -{ - return (boolean) (priority >= 1 && priority <= 254); -} - -RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( - int priority -) -{ - return (Priority_Control) (255 - priority); -} - -RTEMS_INLINE_ROUTINE int _POSIX_Priority_From_core( - Priority_Control priority -) -{ - return 255 - priority; -} - -#endif diff --git a/c/src/exec/posix/inline/pthread.inl b/c/src/exec/posix/inline/pthread.inl deleted file mode 100644 index 51f7287384..0000000000 --- a/c/src/exec/posix/inline/pthread.inl +++ /dev/null @@ -1,70 +0,0 @@ -/* rtems/posix/pthread.inl - * - * This include file contains the static inline implementation of the private - * inlined routines for POSIX threads. - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#ifndef __RTEMS_POSIX_THREADS_inl -#define __RTEMS_POSIX_THREADS_inl - -/*PAGE - * - * _POSIX_Threads_Allocate - */ - -RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void ) -{ - return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information ); -} - -/*PAGE - * - * _POSIX_Threads_Free - */ - -RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free ( - Thread_Control *the_pthread -) -{ - _Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object ); -} - -/*PAGE - * - * _POSIX_Threads_Get - */ - -RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get ( - pthread_t id, - Objects_Locations *location -) -{ - return (Thread_Control *) - _Objects_Get( &_POSIX_Threads_Information, (Objects_Id)id, location ); -} - -/*PAGE - * - * _POSIX_Threads_Is_null - */ - -RTEMS_INLINE_ROUTINE boolean _POSIX_Threads_Is_null ( - Thread_Control *the_pthread -) -{ - return !the_pthread; -} - -#endif -/* end of include file */ - diff --git a/c/src/exec/posix/inline/semaphore.inl b/c/src/exec/posix/inline/semaphore.inl deleted file mode 100644 index 8f2189d82a..0000000000 --- a/c/src/exec/posix/inline/semaphore.inl +++ /dev/null @@ -1,71 +0,0 @@ -/* rtems/posix/semaphore.inl - * - * This include file contains the static inline implementation of the private - * inlined routines for POSIX Semaphores. - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#ifndef __RTEMS_POSIX_SEMAPHORE_inl -#define __RTEMS_POSIX_SEMAPHORE_inl - -/*PAGE - * - * _POSIX_Semaphore_Allocate - */ - -RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void ) -{ - return (POSIX_Semaphore_Control *) - _Objects_Allocate( &_POSIX_Semaphore_Information ); -} - -/*PAGE - * - * _POSIX_Semaphore_Free - */ - -RTEMS_INLINE_ROUTINE void _POSIX_Semaphore_Free ( - POSIX_Semaphore_Control *the_semaphore -) -{ - _Objects_Free( &_POSIX_Semaphore_Information, &the_semaphore->Object ); -} - -/*PAGE - * - * _POSIX_Semaphore_Get - */ - -RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get ( - Objects_Id *id, - Objects_Locations *location -) -{ - return (POSIX_Semaphore_Control *) - _Objects_Get( &_POSIX_Semaphore_Information, *id, location ); -} - -/*PAGE - * - * _POSIX_Semaphore_Is_null - */ - -RTEMS_INLINE_ROUTINE boolean _POSIX_Semaphore_Is_null ( - POSIX_Semaphore_Control *the_semaphore -) -{ - return !the_semaphore; -} - -#endif -/* end of include file */ - diff --git a/c/src/exec/posix/macros/Makefile.in b/c/src/exec/posix/macros/Makefile.in deleted file mode 100644 index d402b7b788..0000000000 --- a/c/src/exec/posix/macros/Makefile.in +++ /dev/null @@ -1,32 +0,0 @@ -# -# $Id$ -# - -@SET_MAKE@ -srcdir = @srcdir@ -VPATH = @srcdir@ -RTEMS_ROOT = @top_srcdir@ -PROJECT_ROOT = @PROJECT_ROOT@ - -# Right now there are not macro implementation of the posix inline routines -# So it won't build -I_PIECES= -I_FILES=$(I_PIECES:%=$(srcdir)/%.inl) - -SRCS=$(I_FILES) - -include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg -include $(RTEMS_ROOT)/make/leaf.cfg - -# -# Add your list of files to delete here. The config files -# already know how to delete some stuff, so you may want -# to just run 'make clean' first to see what gets missed. -# 'make clobber' already includes 'make clean' -# - -CLEAN_ADDITIONS += -CLOBBER_ADDITIONS += - -all: $(SRCS) - #$(INSTALL) -m 444 ${I_FILES} $(PROJECT_INCLUDE)/rtems/posix diff --git a/c/src/exec/posix/sys/Makefile.in b/c/src/exec/posix/sys/Makefile.in deleted file mode 100644 index e787a7a977..0000000000 --- a/c/src/exec/posix/sys/Makefile.in +++ /dev/null @@ -1,31 +0,0 @@ -# -# $Id$ -# - -@SET_MAKE@ -srcdir = @srcdir@ -VPATH = @srcdir@ -RTEMS_ROOT = @top_srcdir@ -PROJECT_ROOT = @PROJECT_ROOT@ - -#H_PIECES=utsname -H_PIECES=utime ioctl -H_FILES=$(H_PIECES:%=$(srcdir)/%.h) - -SRCS=$(H_FILES) - -include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg -include $(RTEMS_ROOT)/make/leaf.cfg - -# -# Add your list of files to delete here. The config files -# already know how to delete some stuff, so you may want -# to just run 'make clean' first to see what gets missed. -# 'make clobber' already includes 'make clean' -# - -CLEAN_ADDITIONS += -CLOBBER_ADDITIONS += - -all: $(SRCS) - $(INSTALL) -m 444 ${H_FILES} $(PROJECT_INCLUDE)/sys diff --git a/c/src/exec/posix/sys/ioctl.h b/c/src/exec/posix/sys/ioctl.h deleted file mode 100644 index 1020db6079..0000000000 --- a/c/src/exec/posix/sys/ioctl.h +++ /dev/null @@ -1,17 +0,0 @@ -/* - * $Id$ - */ - -#ifndef __SYS_IOCTL_h__ -#define __SYS_IOCTL_h__ - -/* Functions */ - -int ioctl( - int fd, - int request, - ... -); - -#endif -/* end of include file */ diff --git a/c/src/exec/posix/sys/utime.h b/c/src/exec/posix/sys/utime.h deleted file mode 100644 index 3e9955e61f..0000000000 --- a/c/src/exec/posix/sys/utime.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - * $Id$ - */ - -#ifndef __UTIME_h__ -#define __UTIME_h__ - -/* - * POSIX 1003.1b 5.6.6 Set File Access and Modification Times - */ - -struct utimbuf { - time_t actime; /* Access time */ - time_t modtime; /* Modification time */ -}; - -/* Functions */ - -int utime( - const char *path, - const struct utimbuf *times -); - -#endif -/* end of include file */ diff --git a/c/src/exec/posix/sys/utsname.h b/c/src/exec/posix/sys/utsname.h deleted file mode 100644 index ca15230d40..0000000000 --- a/c/src/exec/posix/sys/utsname.h +++ /dev/null @@ -1,49 +0,0 @@ -/* sys/utsname.h - * - * $Id$ - */ - -#ifndef __POSIX_SYS_UTSNAME_h -#define __POSIX_SYS_UTSNAME_h - -#include -#include - -/* - * 4.4.1 Get System Name (Table 4-1), P1003.1b-1993, p. 90 - * - * NOTE: The lengths of the strings in this structure are - * just long enough to reliably contain the RTEMS information. - * For example, the fields are not long enough to support - * Internet hostnames. - */ - -struct utsname { - char sysname[ 32 ]; /* Name of this implementation of the operating system */ - char nodename[ 32 ]; /* Name of this node within an implementation */ - /* specified communication network */ - char release[ 32 ]; /* Current release level of this implementation */ - char version[ 32 ]; /* Current version level of this release */ - char machine[ 32 ]; /* Name of the hardware type on which the system */ - /* is running */ -}; - -/* - * 4.4.1 Get System Name, P1003.1b-1993, p. 90 - */ - -int uname( - struct utsname *name -); - -/* - * 4.5.2 Get Process Times, P1003.1b-1993, p. 92 - */ - -clock_t times( - struct tms *buffer -); - -#endif -/* end of include file */ - -- cgit v1.2.3