… | |
… | |
36 | * provisions above, a recipient may use your version of this file under |
36 | * provisions above, a recipient may use your version of this file under |
37 | * either the BSD or the GPL. |
37 | * either the BSD or the GPL. |
38 | */ |
38 | */ |
39 | |
39 | |
40 | #include "eio.h" |
40 | #include "eio.h" |
|
|
41 | |
|
|
42 | #ifdef EIO_STACKSIZE |
|
|
43 | # define XTHREAD_STACKSIZE EIO_STACKSIZE |
|
|
44 | #endif |
41 | #include "xthread.h" |
45 | #include "xthread.h" |
42 | |
46 | |
43 | #include <errno.h> |
47 | #include <errno.h> |
44 | #include <stddef.h> |
48 | #include <stddef.h> |
45 | #include <stdlib.h> |
49 | #include <stdlib.h> |
… | |
… | |
767 | |
771 | |
768 | X_LOCK (preadwritelock); |
772 | X_LOCK (preadwritelock); |
769 | ooffset = lseek (fd, 0, SEEK_CUR); |
773 | ooffset = lseek (fd, 0, SEEK_CUR); |
770 | lseek (fd, offset, SEEK_SET); |
774 | lseek (fd, offset, SEEK_SET); |
771 | res = write (fd, buf, count); |
775 | res = write (fd, buf, count); |
772 | lseek (fd, offset, SEEK_SET); |
776 | lseek (fd, ooffset, SEEK_SET); |
773 | X_UNLOCK (preadwritelock); |
777 | X_UNLOCK (preadwritelock); |
774 | |
778 | |
775 | return res; |
779 | return res; |
776 | } |
780 | } |
777 | #endif |
781 | #endif |