Skip to content

Commit 4163e94

Browse files
committed
Cosmetic whitespace fixes
1 parent 49fab00 commit 4163e94

2 files changed

Lines changed: 12 additions & 17 deletions

File tree

src/zclock.c

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,6 @@ The zclock class provides essential sleep and system time functions, used
2727
to slow down threads for testing, and calculate timers for polling. Wraps
2828
the non-portable system calls in a simple portable API.
2929
@discuss
30-
This class contains some small surprises. Most amazing, win32 did an API
31-
better than POSIX. The win32 Sleep() call is not only a neat 1-liner, it
32-
also sleeps for milliseconds, whereas the POSIX call asks us to think in
33-
terms of nanoseconds, which is insane. I've decided every single man page
34-
for this library will say "insane" at least once. Anyhow, milliseconds
35-
are a concept we can deal with. Seconds are too fat, nanoseconds too
36-
tiny, but milliseconds are just right for slices of time we want to work
37-
with at the 0MQ scale. zclock doesn't give you objects to work with, we
38-
like the czmq class model but we're not insane. There, got it in again.
3930
The Win32 Sleep() call defaults to 16ms resolution unless the system timer
4031
resolution is increased with a call to timeBeginPeriod() permitting 1ms
4132
granularity.
@@ -52,9 +43,10 @@ granularity.
5243
static int64_t
5344
s_filetime_to_msec (const FILETIME *ft)
5445
{
55-
// As per Windows documentation for FILETIME, copy the resulting FILETIME structure to a
56-
// ULARGE_INTEGER structure using memcpy (using memcpy instead of direct assignment can
57-
// prevent alignment faults on 64-bit Windows).
46+
// As per Windows documentation for FILETIME, copy the resulting FILETIME
47+
// structure to a ULARGE_INTEGER structure using memcpy (using memcpy
48+
// instead of direct assignment can prevent alignment faults on 64-bit
49+
// Windows).
5850
ULARGE_INTEGER dateTime;
5951
memcpy (&dateTime, ft, sizeof (dateTime));
6052

@@ -75,11 +67,12 @@ zclock_sleep (int msecs)
7567
t.tv_nsec = (msecs % 1000) * 1000000;
7668
nanosleep (&t, NULL);
7769
#elif (defined (__WINDOWS__))
78-
// Windows XP/2000: A value of zero causes the thread to relinquish the
79-
// remainder of its time slice to any other thread of equal priority that is
80-
// ready to run. If there are no other threads of equal priority ready to run,
81-
// the function returns immediately, and the thread continues execution. This
82-
// behavior changed starting with Windows Server 2003.
70+
// Windows XP/2000: A value of zero causes the thread to relinquish the
71+
// remainder of its time slice to any other thread of equal priority that
72+
// is ready to run. If there are no other threads of equal priority ready
73+
// to run, the function returns immediately, and the thread continues
74+
// execution. This behavior changed starting with Windows Server 2003.
75+
8376
# if defined (NTDDI_VERSION) && defined (NTDDI_WS03) && (NTDDI_VERSION >= NTDDI_WS03)
8477
Sleep (msecs);
8578
# else

src/zlist.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,7 @@ s_compare (void *item1, void *item2)
350350
return false;
351351
}
352352

353+
353354
// --------------------------------------------------------------------------
354355
// Set list for automatic item destruction
355356

@@ -360,6 +361,7 @@ zlist_autofree (zlist_t *self)
360361
self->autofree = true;
361362
}
362363

364+
363365
// --------------------------------------------------------------------------
364366
// Runs selftest of class
365367

0 commit comments

Comments
 (0)