Branch: Tag:

2010-02-18

2010-02-18 14:50:41 by Stephen R. van den Berg <srb@cuci.nl>

Simplify and reduce sleep functions, use nanosleep when available.

Rev: src/builtin_functions.c:1.696
Rev: src/port.c:1.89
Rev: src/port.h:1.68
Rev: src/post_modules/SQLite/sqlite.cmod:1.30
Rev: src/threads.c:1.282

2:   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: threads.c,v 1.281 2009/09/29 11:09:33 mast Exp $ + || $Id: threads.c,v 1.282 2010/02/18 14:50:41 srb Exp $   */      #include "global.h"
2667: Inside #if defined(DO_PIKE_CLEANUP)
      while (num_pending_interrupts && time (NULL) < timeout) {    THREADS_ALLOW(); - #ifdef __NT__ -  Sleep (1); - #elif defined (HAVE_USLEEP) -  usleep (1000); - #else -  sleep (1); - #endif +  sysleep(1.0);    THREADS_DISALLOW();    }