ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/SheepShaver/src/Unix/Linux/sheepthreads.c
(Generate patch)

Comparing SheepShaver/src/Unix/Linux/sheepthreads.c (file contents):
Revision 1.7 by gbeauche, 2005-06-25T11:00:30Z vs.
Revision 1.9 by gbeauche, 2005-07-03T23:28:30Z

# Line 34 | Line 34
34   #include <unistd.h>
35   #include <signal.h>
36   #include <pthread.h>
37 #include <semaphore.h>
37  
38  
39   /* Thread stack size */
# Line 50 | Line 49 | extern int test_and_set(int *var, int va
49   extern int __clone(int (*fn)(void *), void *, int, void *);
50  
51   /* struct sem_t */
52 + typedef struct {
53 +        struct _pthread_fastlock __sem_lock;
54 +        int __sem_value;
55 +        _pthread_descr __sem_waiting;
56 + } sem_t;
57 +
58 + #define SEM_VALUE_MAX 64
59   #define status __status
60   #define spinlock __spinlock
61   #define sem_lock __sem_lock
# Line 358 | Line 364 | int sem_destroy(sem_t *sem)
364  
365   int sem_wait(sem_t *sem)
366   {
361        int cnt = 0;
362        struct timespec tm;
363
367          if (sem == NULL) {
368                  errno = EINVAL;
369                  return -1;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines