00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #include "apr_thread_proc.h"
00018 #include "apr_arch_file_io.h"
00019 #include "apr_file_io.h"
00020 #include "apr_thread_proc.h"
00021 #include "apr_general.h"
00022 #include "apr_portable.h"
00023 #include <kernel/OS.h>
00024 #include <signal.h>
00025 #include <string.h>
00026 #include <sys/wait.h>
00027 #include <image.h>
00028
00029 #ifndef THREAD_PROC_H
00030 #define THREAD_PROC_H
00031
00032 #define SHELL_PATH "/bin/sh"
00033
00034 #define PTHREAD_CANCEL_AYNCHRONOUS CANCEL_ASYNCH;
00035 #define PTHREAD_CANCEL_DEFERRED CANCEL_DEFER;
00036
00037 #define PTHREAD_CANCEL_ENABLE CANCEL_ENABLE;
00038 #define PTHREAD_CANCEL_DISABLE CANCEL_DISABLE;
00039
00040 #define BEOS_MAX_DATAKEYS 128
00041
00042 struct apr_thread_t {
00043 apr_pool_t *pool;
00044 thread_id td;
00045 void *data;
00046 apr_thread_start_t func;
00047 apr_status_t exitval;
00048 };
00049
00050 struct apr_threadattr_t {
00051 apr_pool_t *pool;
00052 int32 attr;
00053 int detached;
00054 int joinable;
00055 };
00056
00057 struct apr_threadkey_t {
00058 apr_pool_t *pool;
00059 int32 key;
00060 };
00061
00062 struct beos_private_data {
00063 const void ** data;
00064 int count;
00065 volatile thread_id td;
00066 };
00067
00068 struct beos_key {
00069 int assigned;
00070 int count;
00071 sem_id lock;
00072 int32 ben_lock;
00073 void (* destructor) (void *);
00074 };
00075
00076 struct apr_procattr_t {
00077 apr_pool_t *pool;
00078 apr_file_t *parent_in;
00079 apr_file_t *child_in;
00080 apr_file_t *parent_out;
00081 apr_file_t *child_out;
00082 apr_file_t *parent_err;
00083 apr_file_t *child_err;
00084 char *currdir;
00085 apr_int32_t cmdtype;
00086 apr_int32_t detached;
00087 };
00088
00089 struct apr_thread_once_t {
00090 sem_id sem;
00091 int hit;
00092 };
00093
00094 #endif
00095