diff options
author | Sebastian Wilhelmi <wilhelmi@ira.uka.de> | 2000-09-06 13:56:17 +0000 |
---|---|---|
committer | Sebastian Wilhelmi <wilhelmi@src.gnome.org> | 2000-09-06 13:56:17 +0000 |
commit | ef2dcd6265bcd52a24fc12cfa8f769f899e13653 (patch) | |
tree | 5375ff67dd7fdd73b67aa88e87530ed7e3354d57 /gthread | |
parent | caeb4053e935d384a1b5691f134ac568bc5d53d6 (diff) | |
download | glib-ef2dcd6265bcd52a24fc12cfa8f769f899e13653.tar.gz |
s/G_MICROSEC/G_USEC_PER_SEC/
2000-09-06 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* glib.h, gtimer.c, tests/thread-test.c:
s/G_MICROSEC/G_USEC_PER_SEC/
* gthread/gthread-posix.c, gthread/gthread-solaris.c:
s/G_MICROSEC/G_USEC_PER_SEC/ and s/G_NANOSEC/G_NSEC_PER_SEC/
Diffstat (limited to 'gthread')
-rw-r--r-- | gthread/ChangeLog | 5 | ||||
-rw-r--r-- | gthread/gthread-posix.c | 7 | ||||
-rw-r--r-- | gthread/gthread-solaris.c | 7 |
3 files changed, 11 insertions, 8 deletions
diff --git a/gthread/ChangeLog b/gthread/ChangeLog index 4a35bfa12..7abe93c3a 100644 --- a/gthread/ChangeLog +++ b/gthread/ChangeLog @@ -1,3 +1,8 @@ +2000-09-06 Sebastian Wilhelmi <wilhelmi@ira.uka.de> + + * gthread-posix.c, gthread-solaris.c: + s/G_MICROSEC/G_USEC_PER_SEC/ and s/G_NANOSEC/G_NSEC_PER_SEC/ + 2000-09-01 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * gthread-posix.c (g_thread_create_posix_impl): Use GError to diff --git a/gthread/gthread-posix.c b/gthread/gthread-posix.c index 5516a2964..bae02f10c 100644 --- a/gthread/gthread-posix.c +++ b/gthread/gthread-posix.c @@ -142,8 +142,7 @@ g_cond_new_posix_impl (void) without error check then!!!!, we might want to change this therfore. */ -#define G_MICROSEC 1000000 -#define G_NANOSEC 1000000000 +#define G_NSEC_PER_SEC 1000000000 static gboolean g_cond_timed_wait_posix_impl (GCond * cond, @@ -164,8 +163,8 @@ g_cond_timed_wait_posix_impl (GCond * cond, } end_time.tv_sec = abs_time->tv_sec; - end_time.tv_nsec = abs_time->tv_usec * (G_NANOSEC / G_MICROSEC); - g_assert (end_time.tv_nsec < G_NANOSEC); + end_time.tv_nsec = abs_time->tv_usec * (G_NSEC_PER_SEC / G_USEC_PER_SEC); + g_assert (end_time.tv_nsec < G_NSEC_PER_SEC); result = pthread_cond_timedwait ((pthread_cond_t *) cond, (pthread_mutex_t *) entered_mutex, &end_time); diff --git a/gthread/gthread-solaris.c b/gthread/gthread-solaris.c index 7cf3c6ff0..99e5ee97a 100644 --- a/gthread/gthread-solaris.c +++ b/gthread/gthread-solaris.c @@ -108,8 +108,7 @@ g_cond_new_solaris_impl () without error check then!!!!, we might want to change this therfore. */ -#define G_MICROSEC 1000000 -#define G_NANOSEC 1000000000 +#define G_NSEC_PER_SEC 1000000000 static gboolean g_cond_timed_wait_solaris_impl (GCond * cond, @@ -130,8 +129,8 @@ g_cond_timed_wait_solaris_impl (GCond * cond, } end_time.tv_sec = abs_time->tv_sec; - end_time.tv_nsec = abs_time->tv_usec * (G_NANOSEC / G_MICROSEC); - g_assert (end_time.tv_nsec < G_NANOSEC); + end_time.tv_nsec = abs_time->tv_usec * (G_NSEC_PER_SEC / G_USEC_PER_SEC); + g_assert (end_time.tv_nsec < G_NSEC_PER_SEC); result = cond_timedwait ((cond_t *) cond, (mutex_t *) entered_mutex, &end_time); timed_out = (result == ETIME); |