g10: Use gpg-error abstraction of sched_yield.
authorJustus Winter <justus@g10code.com>
Thu, 31 Mar 2016 15:23:31 +0000 (17:23 +0200)
committerJustus Winter <justus@g10code.com>
Thu, 31 Mar 2016 15:23:31 +0000 (17:23 +0200)
* g10/tofu.c (begin_transaction): Use 'gpgrt_yield'.

Signed-off-by: Justus Winter <justus@g10code.com>
g10/tofu.c

index baa2ac2..5f381b0 100644 (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.