summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-06-26 09:45:09 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-06-26 09:45:09 +0000
commit05da25f297c4d26b6bb454a9649b1dd63a102910 (patch)
tree568d1118ca9c2c7bfbcaf2d2132a7e870367d407 /file.c
parent839f4c5f3fdb4ea6b270fce17f1c3881060087d4 (diff)
980626
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r--file.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/file.c b/file.c
index df17d65630..68d3a3c163 100644
--- a/file.c
+++ b/file.c
@@ -12,6 +12,7 @@
#include "ruby.h"
#include "rubyio.h"
+#include "rubysig.h"
#ifdef HAVE_UNISTD_H
#include <unistd.h>
@@ -1376,10 +1377,10 @@ file_truncate(obj, len)
#if defined(THREAD) && defined(EWOULDBLOCK)
static int
-thred_flock(fd, op)
+thread_flock(fd, op)
int fd, op;
{
- if (thred_alone() || (op & LOCK_NB)) {
+ if (thread_alone() || (op & LOCK_NB)) {
return flock(fd, op);
}
op |= LOCK_NB;
@@ -1387,7 +1388,7 @@ thred_flock(fd, op)
switch (errno) {
case EINTR: /* can be happen? */
case EWOULDBLOCK:
- thred_schedule(); /* busy wait */
+ thread_schedule(); /* busy wait */
break;
default:
return -1;
@@ -1395,7 +1396,7 @@ thred_flock(fd, op)
}
return 0;
}
-#define flock thred_flock
+#define flock thread_flock
#endif
static VALUE