mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 06:56:14 +01:00
Simplify the loop for the fix below.
Tue Feb 22 18:33:07 2005 Manish Singh <yosh@gimp.org> * glib/gtimer.c (g_usleep): Simplify the loop for the fix below.
This commit is contained in:
parent
0e2279a092
commit
ea28f59fc1
@ -1,3 +1,7 @@
|
|||||||
|
Tue Feb 22 18:33:07 2005 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* glib/gtimer.c (g_usleep): Simplify the loop for the fix below.
|
||||||
|
|
||||||
2005-02-20 Matthias Clasen <mclasen@redhat.com>
|
2005-02-20 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* glib/gqueue.c (g_queue_new): Use a memchunk for
|
* glib/gqueue.c (g_queue_new): Use a memchunk for
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
Tue Feb 22 18:33:07 2005 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* glib/gtimer.c (g_usleep): Simplify the loop for the fix below.
|
||||||
|
|
||||||
2005-02-20 Matthias Clasen <mclasen@redhat.com>
|
2005-02-20 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* glib/gqueue.c (g_queue_new): Use a memchunk for
|
* glib/gqueue.c (g_queue_new): Use a memchunk for
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
Tue Feb 22 18:33:07 2005 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* glib/gtimer.c (g_usleep): Simplify the loop for the fix below.
|
||||||
|
|
||||||
2005-02-20 Matthias Clasen <mclasen@redhat.com>
|
2005-02-20 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* glib/gqueue.c (g_queue_new): Use a memchunk for
|
* glib/gqueue.c (g_queue_new): Use a memchunk for
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
Tue Feb 22 18:33:07 2005 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* glib/gtimer.c (g_usleep): Simplify the loop for the fix below.
|
||||||
|
|
||||||
2005-02-20 Matthias Clasen <mclasen@redhat.com>
|
2005-02-20 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* glib/gqueue.c (g_queue_new): Use a memchunk for
|
* glib/gqueue.c (g_queue_new): Use a memchunk for
|
||||||
|
@ -240,18 +240,8 @@ g_usleep (gulong microseconds)
|
|||||||
struct timespec request, remaining;
|
struct timespec request, remaining;
|
||||||
request.tv_sec = microseconds / G_USEC_PER_SEC;
|
request.tv_sec = microseconds / G_USEC_PER_SEC;
|
||||||
request.tv_nsec = 1000 * (microseconds % G_USEC_PER_SEC);
|
request.tv_nsec = 1000 * (microseconds % G_USEC_PER_SEC);
|
||||||
while (1)
|
while (nanosleep (&request, &remaining) == -1 && errno == EINTR)
|
||||||
{
|
request = remaining;
|
||||||
if (nanosleep (&request, &remaining) == -1)
|
|
||||||
{
|
|
||||||
if (errno == EINTR)
|
|
||||||
request = remaining;
|
|
||||||
else
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
# else /* !HAVE_NANOSLEEP */
|
# else /* !HAVE_NANOSLEEP */
|
||||||
if (g_thread_supported ())
|
if (g_thread_supported ())
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user