diff options
author | Sebastian Wilhelmi <wilhelmi@ira.uka.de> | 2000-11-21 15:27:44 +0000 |
---|---|---|
committer | Sebastian Wilhelmi <wilhelmi@src.gnome.org> | 2000-11-21 15:27:44 +0000 |
commit | a3036a5bd2119e53bd90e9daa6182e9d26538879 (patch) | |
tree | 4000b99079338e689c71611633ffa938893f1860 /gfileutils.c | |
parent | 55bdf1322b6d5fbb7ca73e4f62d30c3e3485147f (diff) |
Add a surrogate for thread priorities using PID niceness for systems with
2000-11-21 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* configure.in: Add a surrogate for thread priorities using PID
niceness for systems with no thread priorities and different PIDs
for threads of the same process (most notably: Linux). Define
G_THREAD_USE_PID_SURROGATE in that case, as used by
gthread-posix.c. Also make the system thread bigger by
sizeof (long) to contain the thread's PID.
* gfileutils.c: Include stdlib.h for mkstemp prototype.
* gthread.c: Add priority range checks to the affected functions.
* gthreadpool.c: Remove unused variable.
* gthread-impl.c, gthread-posix.c, gthread-solaris.c: Removed
g_thread_map_priority function in favour of the
g_thread_priority_map array. Initialize the array with
PRIORITY_{...}_VALUE, if available and interpolate beetween the
bounds if .._NORMAL_.. and .._HIGH_.. are not available.
* gthread-posix.c: If we should use the PID niceness as a
surrogate for thread priorities (G_THREAD_USE_PID_SURROGATE is
defined), then disable normal priority handling and use PIDs and
setpriority() instead. Depends on the thread to write its PID into
the place after the thread id right after thread creation.
Diffstat (limited to 'gfileutils.c')
-rw-r--r-- | gfileutils.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gfileutils.c b/gfileutils.c index 47c2ef68a..ce802426d 100644 --- a/gfileutils.c +++ b/gfileutils.c @@ -32,6 +32,7 @@ #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> +#include <stdlib.h> #ifdef G_OS_WIN32 #include <io.h> |