bug (13/26)
Brian Grossman
briang@gomer.fc.hp.com
Tue Sep 8 20:53:00 GMT 1998
# 43 "../mit-pthreads/include/timers.h" 2
# 40 "../mit-pthreads/include/pthread/cond.h" 2
enum pthread_condtype {
COND_TYPE_FAST,
COND_TYPE_STATIC_FAST,
COND_TYPE_COUNTING_FAST,
COND_TYPE_METERED,
COND_TYPE_DEBUG,
COND_TYPE_MAX
};
typedef struct pthread_cond {
enum pthread_condtype c_type;
struct pthread_queue c_queue;
semaphore c_lock;
void * c_data;
long c_flags;
} pthread_cond_t;
typedef struct pthread_condattr {
enum pthread_condtype c_type;
long c_flags;
} pthread_condattr_t;
extern "C" {
int pthread_cond_init (pthread_cond_t *, const pthread_condattr_t *) ;
int pthread_cond_timedwait (pthread_cond_t *, pthread_mutex_t *,
const struct timespec * abstime) ;
int pthread_cond_wait (pthread_cond_t *, pthread_mutex_t *) ;
int pthread_cond_signal (pthread_cond_t *) ;
int pthread_cond_broadcast (pthread_cond_t *) ;
int pthread_cond_destroy (pthread_cond_t *) ;
};
# 56 "../mit-pthreads/include/pthread.h" 2
# 1 "../mit-pthreads/include/pthread/fd.h" 1
enum fd_type {
FD_NT,
FD_NIU,
FD_HALF_DUPLEX,
FD_FULL_DUPLEX,
FD_TEST_HALF_DUPLEX,
FD_TEST_FULL_DUPLEX
};
union fd_data {
void *ptr;
int i;
};
struct timespec;
struct iovec;
struct fd_ops {
int (*write) (union fd_data, int, const void *,
size_t, struct timespec *) ;
int (*read) (union fd_data, int, void *, size_t,
struct timespec *) ;
int (*close)();
int (*fcntl)();
int (*writev) (union fd_data, int,
const struct iovec *,
int, struct timespec *) ;
int (*readv) (union fd_data, int,
const struct iovec *,
int, struct timespec *) ;
off_t (*seek)();
int use_kfds;
};
struct fd_table_entry {
struct pthread_queue r_queue;
struct pthread_queue w_queue;
struct pthread *r_owner;
struct pthread *w_owner;
pthread_mutex_t mutex;
struct fd_table_entry *next;
struct fd_ops *ops;
enum fd_type type;
int r_lockcount;
int w_lockcount;
int count;
int flags;
union fd_data fd;
};
extern "C" {
};
# 57 "../mit-pthreads/include/pthread.h" 2
# 1 "../mit-pthreads/include/pthread/debug_out.h" 1
# 39 "../mit-pthreads/include/pthread/debug_out.h"
# 58 "../mit-pthreads/include/pthread.h" 2
# 1 "../mit-pthreads/include/pthread/specific.h" 1
struct pthread_key {
pthread_mutex_t mutex;
long count;
void (*destructor)();
};
typedef int pthread_key_t;
extern "C" {
int pthread_key_create (pthread_key_t *, void (*routine)(void *)) ;
int pthread_setspecific (pthread_key_t, const void *) ;
void *pthread_getspecific (pthread_key_t) ;
int pthread_key_delete (pthread_key_t) ;
};
# 61 "../mit-pthreads/include/pthread.h" 2
# 1 "../mit-pthreads/include/pthread/util.h" 1
# 87 "../mit-pthreads/include/pthread/util.h"
# 63 "../mit-pthreads/include/pthread.h" 2
# 1 "../mit-pthreads/include/pthread/pthread_once.h" 1
typedef struct pthread_once {
int state;
pthread_mutex_t mutex;
} pthread_once_t;
extern "C" {
int pthread_once (pthread_once_t *, void (*init_routine)(void)) ;
};
# 66 "../mit-pthreads/include/pthread.h" 2
# 1 "../mit-pthreads/include/pthread/pthread_attr.h" 1
enum schedparam_policy {
SCHED_RR,
SCHED_IO,
SCHED_FIFO,
SCHED_OTHER
};
struct pthread_attr {
enum schedparam_policy schedparam_policy;
int sched_priority;
int flags;
void * arg_attr;
void (*cleanup_attr)();
void * stackaddr_attr;
size_t stacksize_attr;
};
struct sched_param {
int sched_priority;
void * no_data;
};
extern "C" {
typedef struct pthread_attr pthread_attr_t;
int pthread_attr_init (pthread_attr_t *) ;
int pthread_attr_destroy (pthread_attr_t *) ;
int pthread_attr_setstacksize (pthread_attr_t *, size_t) ;
int pthread_attr_getstacksize (pthread_attr_t *, size_t *) ;
int pthread_attr_setstackaddr (pthread_attr_t *, void *) ;
int pthread_attr_getstackaddr (pthread_attr_t *, void **) ;
int pthread_attr_setdetachstate (pthread_attr_t *, int ) ;
int pthread_attr_getdetachstate (pthread_attr_t *, int *) ;
int pthread_attr_setscope (pthread_attr_t *, int ) ;
int pthread_attr_getscope (pthread_attr_t *, int *) ;
int pthread_attr_setinheritsched (pthread_attr_t *, int ) ;
int pthread_attr_getinheritsched (pthread_attr_t *, int *) ;
int pthread_attr_setschedpolicy (pthread_attr_t *, int ) ;
int pthread_attr_getschedpolicy (pthread_attr_t *, int *) ;
int pthread_attr_setschedparam (pthread_attr_t *, struct sched_param *) ;
int pthread_attr_getschedparam (pthread_attr_t *, struct sched_param *) ;
int pthread_attr_setfloatstate (pthread_attr_t *, int ) ;
int pthread_attr_getfloatstate (pthread_attr_t *, int *) ;
int pthread_attr_setcleanup (pthread_attr_t *, void (*routine)(void *),
void *) ;
};
# 69 "../mit-pthreads/include/pthread.h" 2
# 261 "../mit-pthreads/include/pthread.h"
struct pthread;
typedef struct pthread *pthread_t;
# 292 "../mit-pthreads/include/pthread.h"
extern "C" {
# 311 "../mit-pthreads/include/pthread.h"
void pthread_init (void) ;
int pthread_create (pthread_t *,
const pthread_attr_t *,
void * (*start_routine)(void *),
void *) ;
void pthread_exit (void *) ;
pthread_t pthread_self (void) ;
int pthread_equal (pthread_t, pthread_t) ;
int pthread_join (pthread_t, void **) ;
int pthread_detach (pthread_t) ;
void pthread_yield (void) ;
int pthread_setschedparam (pthread_t pthread, int policy,
struct sched_param * param) ;
int pthread_getschedparam (pthread_t pthread, int * policy,
struct sched_param * param) ;
int pthread_kill (struct pthread *, int) ;
void (*pthread_signal (int, void (*)(int)) )();
int pthread_cancel ( pthread_t pthread ) ;
int pthread_setcancelstate ( int state, int *oldstate ) ;
int pthread_setcanceltype ( int type, int *oldtype ) ;
void pthread_testcancel ( void ) ;
int pthread_sigmask (int how, const sigset_t *set,
sigset_t * oset) ;
int sigwait (const sigset_t * set, int * sig) ;
int sigsetwait (const sigset_t * set, int * sig) ;
};
extern struct pthread * pthread_initial;
class __pthread_init_t {
public:
__pthread_init_t() {
if (pthread_initial == __null ) {
pthread_init();
}
}
};
static __pthread_init_t __pthread_init_this_file;
# 16 "../include/my_pthread.h" 2
# 1 "../mit-pthreads/include/sched.h" 1
extern "C" {
int sched_yield (void) ;
int sched_get_priority_max (int) ;
int sched_get_priority_min (int) ;
};
# 24 "../include/my_pthread.h" 2
my_bool my_thread_global_init(void);
extern my_bool my_thread_init(void);
extern void my_thread_end(void);
extern int my_pthread_getprio(pthread_t thread_id);
extern char *my_thread_name(void);
extern long my_thread_id(void);
typedef void *(* pthread_handler)(void *);
# 55 "../include/my_pthread.h"
# 78 "../include/my_pthread.h"
extern void my_pthread_setprio(pthread_t thread_id,int prior);
# 141 "../include/my_pthread.h"
# 230 "../include/my_pthread.h"
# 12 "../include/thr_lock.h" 2
# 1 "../include/list.h" 1
extern "C" {
typedef struct st_list {
struct st_list *prev,*next;
void *data;
} LIST;
typedef int (*list_walk_action)(void *,void *);
extern LIST *list_add(LIST *root,LIST *element);
extern LIST *list_delete(LIST *root,LIST *element);
extern LIST *list_cons(void *data,LIST *root);
extern LIST *list_reverse(LIST *root);
extern void list_free(LIST *root,pbool free_data);
extern uint list_length(LIST *list);
extern int list_walk(LIST *list,list_walk_action action,gptr argument);
}
# 13 "../include/thr_lock.h" 2
struct st_thr_lock;
typedef struct st_thr_lock_data {
pthread_t thread;
struct st_thr_lock_data *next,**prev;
struct st_thr_lock *lock;
pthread_cond_t *cond;
int type;
ulong thread_id;
} THR_LOCK_DATA;
struct st_lock_list {
THR_LOCK_DATA *data,**last;
};
typedef struct st_thr_lock {
LIST list;
pthread_mutex_t mutex;
struct st_lock_list read_wait;
struct st_lock_list read;
struct st_lock_list write_wait;
struct st_lock_list write;
} THR_LOCK;
my_bool init_thr_lock(void);
void thr_lock_init(THR_LOCK *lock);
void thr_lock_delete(THR_LOCK *lock);
void thr_lock_data_init(THR_LOCK *lock,THR_LOCK_DATA *data);
int thr_lock(THR_LOCK_DATA *data,int lock_type);
void thr_unlock(THR_LOCK_DATA *data);
void thr_multi_lock(THR_LOCK_DATA **data,uint count);
void thr_multi_unlock(THR_LOCK_DATA **data,uint count);
void thr_print_locks(void);
}
# 20 "mysql_priv.h" 2
extern "C" {
# 1 "../mit-pthreads/include/sys/socket.h" 1
struct sockaddr {
unsigned short sa_family;
char sa_data[14];
};
struct sockproto {
unsigned short sp_family;
unsigned short sp_protocol;
};
More information about the Gcc-bugs
mailing list