mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-02 17:26:17 +01:00
Fix usage of nanosleep(). (#163039, Bastien Nocera)
2005-02-20 Matthias Clasen <mclasen@redhat.com> * glib/gtimer.c (g_usleep): Fix usage of nanosleep(). (#163039, Bastien Nocera)
This commit is contained in:
parent
0def87725b
commit
92e7a4f3c9
@ -1,3 +1,8 @@
|
||||
2005-02-20 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* glib/gtimer.c (g_usleep): Fix usage of
|
||||
nanosleep(). (#163039, Bastien Nocera)
|
||||
|
||||
2005-02-16 Adi Attar <aattar@cvs.gnome.org>
|
||||
|
||||
* configure.in: Added "xh" to ALL_LINGUAS.
|
||||
|
@ -1,3 +1,8 @@
|
||||
2005-02-20 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* glib/gtimer.c (g_usleep): Fix usage of
|
||||
nanosleep(). (#163039, Bastien Nocera)
|
||||
|
||||
2005-02-16 Adi Attar <aattar@cvs.gnome.org>
|
||||
|
||||
* configure.in: Added "xh" to ALL_LINGUAS.
|
||||
|
@ -1,3 +1,8 @@
|
||||
2005-02-20 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* glib/gtimer.c (g_usleep): Fix usage of
|
||||
nanosleep(). (#163039, Bastien Nocera)
|
||||
|
||||
2005-02-16 Adi Attar <aattar@cvs.gnome.org>
|
||||
|
||||
* configure.in: Added "xh" to ALL_LINGUAS.
|
||||
|
@ -1,3 +1,8 @@
|
||||
2005-02-20 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* glib/gtimer.c (g_usleep): Fix usage of
|
||||
nanosleep(). (#163039, Bastien Nocera)
|
||||
|
||||
2005-02-16 Adi Attar <aattar@cvs.gnome.org>
|
||||
|
||||
* configure.in: Added "xh" to ALL_LINGUAS.
|
||||
|
@ -240,8 +240,18 @@ g_usleep (gulong microseconds)
|
||||
struct timespec request, remaining;
|
||||
request.tv_sec = microseconds / G_USEC_PER_SEC;
|
||||
request.tv_nsec = 1000 * (microseconds % G_USEC_PER_SEC);
|
||||
while (nanosleep (&request, &remaining) == EINTR)
|
||||
while (1)
|
||||
{
|
||||
if (nanosleep (&request, &remaining) == -1)
|
||||
{
|
||||
if (errno == EINTR)
|
||||
request = remaining;
|
||||
else
|
||||
break;
|
||||
}
|
||||
else
|
||||
break;
|
||||
}
|
||||
# else /* !HAVE_NANOSLEEP */
|
||||
if (g_thread_supported ())
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user