* cygwin.din: Export getpriority and setpriority.
* fork.cc (fork_parent): Copy parent's nice value into child. * spawn.cc (spawn_guts): Ditto. * miscfuncs.cc (winprio_to_nice): New function. (nice_to_winprio): Ditto. * pinfo.cc (pinfo_init): If parent is not a Cygwin process, set default nice value according to current Win32 priority class. * pinfo.h (class _pinfo): Add nice member. * syscalls.cc (setpriority): New function, only implementing PRIO_PROCESS for now. (getpriority): Ditto. (nice): Just call setpriority. * wincap.h (wincaps::has_extended_priority_class): New element. * wincap.cc: Implement above element throughout. * winsup.h: Add prototypes for winprio_to_nice and nice_to_winprio. * include/limits.h (NZERO): New define. * include/cygwin/types.h (id_t): New datatype. * include/cygwin/version.h: Bump API minor version. * include/sys/resource.h: Add PRIO_XXX defines and prototypes for getpriority and setpriority.
This commit is contained in:
@ -99,6 +99,12 @@ typedef __ino32_t ino_t;
|
||||
#endif
|
||||
#endif /*__ino_t_defined*/
|
||||
|
||||
/* Generic ID type, must match at least pid_t, uid_t and gid_t in size. */
|
||||
#ifndef __id_t_defined
|
||||
#define __id_t_defined
|
||||
typedef unsigned long id_t;
|
||||
#endif /* __id_t_defined */
|
||||
|
||||
#if defined (__INSIDE_CYGWIN__)
|
||||
struct __flock32 {
|
||||
short l_type; /* F_RDLCK, F_WRLCK, or F_UNLCK */
|
||||
|
@ -245,12 +245,13 @@ details. */
|
||||
getlogin_r.
|
||||
116: Export atoll.
|
||||
117: Export utmpx functions, Return utmp * from pututent.
|
||||
118: Export getpriority, setpriority.
|
||||
*/
|
||||
|
||||
/* Note that we forgot to bump the api for ualarm, strtoll, strtoull */
|
||||
|
||||
#define CYGWIN_VERSION_API_MAJOR 0
|
||||
#define CYGWIN_VERSION_API_MINOR 117
|
||||
#define CYGWIN_VERSION_API_MINOR 118
|
||||
|
||||
/* There is also a compatibity version number associated with the
|
||||
shared memory regions. It is incremented when incompatible
|
||||
|
Reference in New Issue
Block a user