1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-05-30 22:08:02 +02:00

g10: Use gpg-error abstraction of sched_yield.

* g10/tofu.c (begin_transaction): Use 'gpgrt_yield'.

Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
Justus Winter 2016-03-31 17:23:31 +02:00
parent e2c5781788
commit 8be9dab2dd

View File

@ -28,7 +28,6 @@
#include <sys/stat.h>
#include <assert.h>
#include <stdarg.h>
#include <sched.h>
#include <sqlite3.h>
#include "gpg.h"
@ -240,7 +239,7 @@ begin_transaction (struct db *db, int only_batch)
batch_update_started = gnupg_get_time ();
/* Yield to allow another process a chance to run. */
sched_yield ();
gpgrt_yield ();
}
/* XXX: In split mode, this can end in deadlock.