mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
g10,w32: Fix build on Windows.
* g10/tofu.c (begin_transaction): Use the new 'gnupg_usleep'. Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
parent
ad491ceec6
commit
5d4f1408d0
@ -192,7 +192,6 @@ begin_transaction (ctrl_t ctrl, int only_batch)
|
|||||||
&& dbs->batch_update_started != gnupg_get_time ())
|
&& dbs->batch_update_started != gnupg_get_time ())
|
||||||
{
|
{
|
||||||
struct stat statbuf;
|
struct stat statbuf;
|
||||||
struct timespec ts;
|
|
||||||
|
|
||||||
/* If we are in a batch update, then batch updates better have
|
/* If we are in a batch update, then batch updates better have
|
||||||
been enabled. */
|
been enabled. */
|
||||||
@ -209,9 +208,7 @@ begin_transaction (ctrl_t ctrl, int only_batch)
|
|||||||
/* Yield to allow another process a chance to run. Note:
|
/* Yield to allow another process a chance to run. Note:
|
||||||
* testing suggests that anything less than a 100ms tends to
|
* testing suggests that anything less than a 100ms tends to
|
||||||
* not result in the other process getting the lock. */
|
* not result in the other process getting the lock. */
|
||||||
memset (&ts, 0, sizeof (ts));
|
gnupg_usleep (100000);
|
||||||
ts.tv_nsec = 100 * 1000 * 1000;
|
|
||||||
nanosleep (&ts, &ts);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
dbs->batch_update_started = gnupg_get_time ();
|
dbs->batch_update_started = gnupg_get_time ();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user