[BACK]Return to pthread_cancelstub.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / lib / libpthread

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/lib/libpthread/pthread_cancelstub.c between version 1.1.2.2 and 1.1.2.3

version 1.1.2.2, 2002/05/20 19:18:44 version 1.1.2.3, 2002/08/02 22:20:48
Line 57 
Line 57 
 #include "pthread.h"  #include "pthread.h"
 #include "pthread_int.h"  #include "pthread_int.h"
   
 int     _syscall_close(int);  int     _sys_close(int);
 int     _syscall_fcntl(int, int, ...);  int     _sys_fcntl(int, int, ...);
 int     _syscall_fsync(int);  int     _sys_fsync(int);
 ssize_t _syscall_msgrcv(int, void *, size_t, long, int);  ssize_t _sys_msgrcv(int, void *, size_t, long, int);
 int     _syscall_msgsnd(int, const void *, size_t, int);  int     _sys_msgsnd(int, const void *, size_t, int);
 int     _syscall___msync13(void *, size_t, int);  int     _sys___msync13(void *, size_t, int);
 int     _syscall_nanosleep(const struct timespec *, struct timespec *);  int     _sys_nanosleep(const struct timespec *, struct timespec *);
 int     _syscall_open(const char *, int, ...);  int     _sys_open(const char *, int, ...);
 int     _syscall_poll(struct pollfd *, nfds_t, int);  int     _sys_poll(struct pollfd *, nfds_t, int);
 ssize_t _syscall_pread(int, void *, size_t, off_t);  ssize_t _sys_pread(int, void *, size_t, off_t);
 ssize_t _syscall_pwrite(int, const void *, size_t, off_t);  ssize_t _sys_pwrite(int, const void *, size_t, off_t);
 ssize_t _syscall_read(int, void *, size_t);  ssize_t _sys_read(int, void *, size_t);
 ssize_t _syscall_readv(int, const struct iovec *, int);  ssize_t _sys_readv(int, const struct iovec *, int);
 int     _syscall_select(int, fd_set *, fd_set *, fd_set *, struct timeval *);  int     _sys_select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
 int     _syscall_wait4(pid_t, int *, int, struct rusage *);  int     _sys_wait4(pid_t, int *, int, struct rusage *);
 ssize_t _syscall_write(int, const void *, size_t);  ssize_t _sys_write(int, const void *, size_t);
 ssize_t _syscall_writev(int, const struct iovec *, int);  ssize_t _sys_writev(int, const struct iovec *, int);
   
   
 int  int
Line 84  close(int d)
Line 84  close(int d)
   
         self = pthread__self();          self = pthread__self();
         pthread__testcancel(self);          pthread__testcancel(self);
         retval = _syscall_close(d);          retval = _sys_close(d);
         pthread__testcancel(self);          pthread__testcancel(self);
   
         return retval;          return retval;
Line 100  fcntl(int fd, int cmd, ...)
Line 100  fcntl(int fd, int cmd, ...)
         self = pthread__self();          self = pthread__self();
         pthread__testcancel(self);          pthread__testcancel(self);
         va_start(ap, cmd);          va_start(ap, cmd);
         retval = _syscall_fcntl(fd, cmd, va_arg(ap, void *));          retval = _sys_fcntl(fd, cmd, va_arg(ap, void *));
         va_end(ap);          va_end(ap);
         pthread__testcancel(self);          pthread__testcancel(self);
   
         return retval;          return retval;
 }  }
   
   
 int  int
 fsync(int d)  fsync(int d)
 {  {
Line 116  fsync(int d)
Line 115  fsync(int d)
   
         self = pthread__self();          self = pthread__self();
         pthread__testcancel(self);          pthread__testcancel(self);
         retval = _syscall_fsync(d);          retval = _sys_fsync(d);
         pthread__testcancel(self);          pthread__testcancel(self);
   
         return retval;          return retval;
Line 130  msgrcv(int msgid, void *msgp, size_t msg
Line 129  msgrcv(int msgid, void *msgp, size_t msg
   
         self = pthread__self();          self = pthread__self();
         pthread__testcancel(self);          pthread__testcancel(self);
         retval = _syscall_msgrcv(msgid, msgp, msgsz, msgtyp, msgflg);          retval = _sys_msgrcv(msgid, msgp, msgsz, msgtyp, msgflg);
         pthread__testcancel(self);          pthread__testcancel(self);
   
         return retval;          return retval;
Line 144  msgsnd(int msgid, const void *msgp, size
Line 143  msgsnd(int msgid, const void *msgp, size
   
         self = pthread__self();          self = pthread__self();
         pthread__testcancel(self);          pthread__testcancel(self);
         retval = _syscall_msgsnd(msgid, msgp, msgsz, msgflg);          retval = _sys_msgsnd(msgid, msgp, msgsz, msgflg);
         pthread__testcancel(self);          pthread__testcancel(self);
   
         return retval;          return retval;
Line 158  __msync13(void *addr, size_t len, int fl
Line 157  __msync13(void *addr, size_t len, int fl
   
         self = pthread__self();          self = pthread__self();
         pthread__testcancel(self);          pthread__testcancel(self);
         retval = _syscall___msync13(addr, len, flags);          retval = _sys___msync13(addr, len, flags);
         pthread__testcancel(self);  
   
         return retval;  
 }  
   
 int  
 nanosleep(const struct timespec *rqtp, struct timespec *rmtp)  
 {  
         int retval;  
         pthread_t self;  
   
         self = pthread__self();  
         pthread__testcancel(self);  
         retval = _syscall_nanosleep(rqtp, rmtp);  
         pthread__testcancel(self);          pthread__testcancel(self);
   
         return retval;          return retval;
Line 188  open(const char *path, int flags, ...)
Line 173  open(const char *path, int flags, ...)
         self = pthread__self();          self = pthread__self();
         pthread__testcancel(self);          pthread__testcancel(self);
         va_start(ap, flags);          va_start(ap, flags);
         retval = _syscall_open(path, flags, va_arg(ap, mode_t));          retval = _sys_open(path, flags, va_arg(ap, mode_t));
         va_end(ap);          va_end(ap);
         pthread__testcancel(self);          pthread__testcancel(self);
   
Line 203  poll(struct pollfd *fds, nfds_t nfds, in
Line 188  poll(struct pollfd *fds, nfds_t nfds, in
   
         self = pthread__self();          self = pthread__self();
         pthread__testcancel(self);          pthread__testcancel(self);
         retval = _syscall_poll(fds, nfds, timeout);          retval = _sys_poll(fds, nfds, timeout);
         pthread__testcancel(self);          pthread__testcancel(self);
   
         return retval;          return retval;
Line 217  pread(int d, void *buf, size_t nbytes, o
Line 202  pread(int d, void *buf, size_t nbytes, o
   
         self = pthread__self();          self = pthread__self();
         pthread__testcancel(self);          pthread__testcancel(self);
         retval = _syscall_pread(d, buf, nbytes, offset);          retval = _sys_pread(d, buf, nbytes, offset);
         pthread__testcancel(self);          pthread__testcancel(self);
   
         return retval;          return retval;
Line 231  pwrite(int d, const void *buf, size_t nb
Line 216  pwrite(int d, const void *buf, size_t nb
   
         self = pthread__self();          self = pthread__self();
         pthread__testcancel(self);          pthread__testcancel(self);
         retval = _syscall_pwrite(d, buf, nbytes, offset);          retval = _sys_pwrite(d, buf, nbytes, offset);
         pthread__testcancel(self);          pthread__testcancel(self);
   
         return retval;          return retval;
Line 245  read(int d, void *buf, size_t nbytes)
Line 230  read(int d, void *buf, size_t nbytes)
   
         self = pthread__self();          self = pthread__self();
         pthread__testcancel(self);          pthread__testcancel(self);
         retval = _syscall_read(d, buf, nbytes);          retval = _sys_read(d, buf, nbytes);
         pthread__testcancel(self);          pthread__testcancel(self);
   
         return retval;          return retval;
Line 259  readv(int d, const struct iovec *iov, in
Line 244  readv(int d, const struct iovec *iov, in
   
         self = pthread__self();          self = pthread__self();
         pthread__testcancel(self);          pthread__testcancel(self);
         retval = _syscall_readv(d, iov, iovcnt);          retval = _sys_readv(d, iov, iovcnt);
         pthread__testcancel(self);          pthread__testcancel(self);
   
         return retval;          return retval;
Line 274  select(int nfds, fd_set *readfds, fd_set
Line 259  select(int nfds, fd_set *readfds, fd_set
   
         self = pthread__self();          self = pthread__self();
         pthread__testcancel(self);          pthread__testcancel(self);
         retval = _syscall_select(nfds, readfds, writefds, exceptfds, timeout);          retval = _sys_select(nfds, readfds, writefds, exceptfds, timeout);
         pthread__testcancel(self);          pthread__testcancel(self);
   
         return retval;          return retval;
Line 288  wait4(pid_t wpid, int *status, int optio
Line 273  wait4(pid_t wpid, int *status, int optio
   
         self = pthread__self();          self = pthread__self();
         pthread__testcancel(self);          pthread__testcancel(self);
         retval = _syscall_wait4(wpid, status, options, rusage);          retval = _sys_wait4(wpid, status, options, rusage);
         pthread__testcancel(self);          pthread__testcancel(self);
   
         return retval;          return retval;
Line 302  write(int d, const void *buf, size_t nby
Line 287  write(int d, const void *buf, size_t nby
   
         self = pthread__self();          self = pthread__self();
         pthread__testcancel(self);          pthread__testcancel(self);
         retval = _syscall_write(d, buf, nbytes);          retval = _sys_write(d, buf, nbytes);
         pthread__testcancel(self);          pthread__testcancel(self);
   
         return retval;          return retval;
Line 316  writev(int d, const struct iovec *iov, i
Line 301  writev(int d, const struct iovec *iov, i
   
         self = pthread__self();          self = pthread__self();
         pthread__testcancel(self);          pthread__testcancel(self);
         retval = _syscall_writev(d, iov, iovcnt);          retval = _sys_writev(d, iov, iovcnt);
         pthread__testcancel(self);          pthread__testcancel(self);
   
         return retval;          return retval;
 }  }
   
   
   __strong_alias(_close, close)
   __strong_alias(_fcntl, fcntl)
   __strong_alias(_fsync, fsync)
   __strong_alias(_msgrcv, msgrcv)
   __strong_alias(_msgsnd, msgsnd)
   __strong_alias(___msync13, __msync13)
   __strong_alias(_nanosleep, nanosleep)
   __strong_alias(_open, open)
   __strong_alias(_poll, poll)
   __strong_alias(_pread, pread)
   __strong_alias(_pwrite, pwrite)
   __strong_alias(_read, read)
   __strong_alias(_readv, readv)
   __strong_alias(_select, select)
   __strong_alias(_wait4, wait4)
   __strong_alias(_write, write)
   __strong_alias(_writev, writev)

Legend:
Removed from v.1.1.2.2  
changed lines
  Added in v.1.1.2.3

CVSweb <webmaster@jp.NetBSD.org>