summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
authorkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-04-29 03:23:13 +0000
committerkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-04-29 03:23:13 +0000
commit9d4ae4ab0c5b17e48939457bc9d4cf45ac412d26 (patch)
tree1634aede192fe6fdce4c69a3d7549dfaf9085751 /thread.c
parenteaca3529f2bbb9d40e887c29b3696a0cfbdd2ce5 (diff)
fix indentation
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31381 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/thread.c b/thread.c
index 8547ff8738..c70e24461b 100644
--- a/thread.c
+++ b/thread.c
@@ -3210,22 +3210,22 @@ rb_mutex_trylock(VALUE self)
static struct timespec init_lock_timeout(int timeout_ms)
{
- struct timespec ts;
- struct timeval tv;
- int ret;
+ struct timespec ts;
+ struct timeval tv;
+ int ret;
- ret = gettimeofday(&tv, NULL);
- if (ret < 0)
- rb_sys_fail(0);
+ ret = gettimeofday(&tv, NULL);
+ if (ret < 0)
+ rb_sys_fail(0);
- ts.tv_sec = tv.tv_sec;
- ts.tv_nsec = tv.tv_usec * 1000 + timeout_ms * 1000 * 1000;
- if (ts.tv_nsec >= 1000000000) {
- ts.tv_sec++;
- ts.tv_nsec -= 1000000000;
- }
+ ts.tv_sec = tv.tv_sec;
+ ts.tv_nsec = tv.tv_usec * 1000 + timeout_ms * 1000 * 1000;
+ if (ts.tv_nsec >= 1000000000) {
+ ts.tv_sec++;
+ ts.tv_nsec -= 1000000000;
+ }
- return ts;
+ return ts;
}
static int