Index: cygwin/Makefile.in
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/Makefile.in,v
retrieving revision 1.51
diff -u -p -r1.51 Makefile.in
--- Makefile.in	2001/02/22 12:56:36	1.51
+++ Makefile.in	2001/03/18 03:27:16
@@ -123,8 +123,8 @@ DLL_OFILES:=assert.o autoload.o cygheap.
 	fork.o glob.o grp.o heap.o init.o ioctl.o localtime.o malloc.o \
 	miscfuncs.o mmap.o \
 	net.o ntea.o passwd.o path.o pinfo.o pipe.o poll.o pthread.o regexp.o \
-	regerror.o regsub.o registry.o resource.o scandir.o security.o select.o \
-	shared.o \
+	regerror.o regsub.o registry.o resource.o scandir.o sched.o schedule.o \
+        security.o select.o shared.o \
 	shortcut.o signal.o sigproc.o smallprint.o spawn.o strace.o strsep.o \
 	sync.o syscalls.o sysconf.o syslog.o termios.o thread.o times.o tty.o \
 	uinfo.o uname.o wait.o window.o \
Index: cygwin/cygwin.din
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/cygwin.din,v
retrieving revision 1.22
diff -u -p -r1.22 cygwin.din
--- cygwin.din	2001/03/17 01:14:57	1.22
+++ cygwin.din	2001/03/18 03:27:23
@@ -1114,6 +1114,14 @@ cygwin32_internal = cygwin_internal
 @PTH_ALLOW@sem_wait
 @PTH_ALLOW@sem_trywait
 @PTH_ALLOW@sem_post
+sched_get_priority_max
+sched_get_priority_min
+sched_getparam
+sched_getscheduler
+sched_rr_get_interval
+sched_setparam
+sched_setscheduler
+sched_yield
 acl
 _acl = acl
 facl
Index: cygwin/external.cc
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/external.cc,v
retrieving revision 1.21
diff -u -p -r1.21 external.cc
--- external.cc	2001/01/28 05:51:14	1.21
+++ external.cc	2001/03/18 03:27:24
@@ -61,6 +61,7 @@ fillout_pinfo (pid_t pid, int winpid)
 	  ep.ppid = p->ppid;
 	  ep.hProcess = p->hProcess;
 	  ep.dwProcessId = p->dwProcessId;
+	  ep.dwThreadId = p->dwThreadId;
 	  ep.uid = p->uid;
 	  ep.gid = p->gid;
 	  ep.pgid = p->pgid;
Index: cygwin/fork.cc
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/fork.cc,v
retrieving revision 1.41
diff -u -p -r1.41 fork.cc
--- fork.cc	2001/02/10 04:20:52	1.41
+++ fork.cc	2001/03/18 03:27:26
@@ -517,6 +517,8 @@ out:
   /* Fill in fields in the child's process table entry.  */
   forked->hProcess = pi.hProcess;
   forked->dwProcessId = pi.dwProcessId;
+  /* needed for scheduler functions */
+  forked->dwThreadId = pi.dwThreadId; 
   forked->copysigs(myself);
 
   /* Hopefully, this will succeed.  The alternative to doing things this
Index: cygwin/pinfo.cc
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/pinfo.cc,v
retrieving revision 1.41
diff -u -p -r1.41 pinfo.cc
--- pinfo.cc	2001/01/30 08:10:04	1.41
+++ pinfo.cc	2001/03/18 03:27:27
@@ -58,6 +58,7 @@ set_myself (pid_t pid, HANDLE h)
     pid = cygwin_pid (winpid);
   myself.init (pid, 1, h);
   myself->dwProcessId = winpid;
+  myself->dwThreadId = GetCurrentThreadId();
   myself->process_state |= PID_IN_USE;
   myself->start_time = time (NULL); /* Register our starting time. */
 
Index: cygwin/pinfo.h
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/pinfo.h,v
retrieving revision 1.24
diff -u -p -r1.24 pinfo.h
--- pinfo.h	2001/03/10 23:37:50	1.24
+++ pinfo.h	2001/03/18 03:27:28
@@ -56,6 +56,12 @@ public:
    */
   DWORD dwProcessId;
 
+  /* dwThreadId contains the main thread of the process. It must not 
+   * be changed or reset. It is used for scheduler access from remote
+   * process's.
+   */
+  DWORD dwThreadId;
+
   /* Used to spawn a child for fork(), among other things. */
   char progname[MAX_PATH];
 
Index: cygwin/include/sys/cygwin.h
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/include/sys/cygwin.h,v
retrieving revision 1.24
diff -u -p -r1.24 cygwin.h
--- cygwin.h	2001/03/05 21:29:23	1.24
+++ cygwin.h	2001/03/18 03:27:29
@@ -231,6 +231,8 @@ struct external_pinfo
   HANDLE strace_file;
 
   DWORD process_state;
+ 
+  DWORD dwThreadId;
 };
 
 DWORD cygwin_internal (cygwin_getinfo_types, ...);
Index: w32api/include/winbase.h
===================================================================
RCS file: /cvs/src/src/winsup/w32api/include/winbase.h,v
retrieving revision 1.9
diff -u -p -r1.9 winbase.h
--- winbase.h	2001/01/26 21:05:20	1.9
+++ winbase.h	2001/03/18 03:27:35
@@ -1410,6 +1410,7 @@ BOOL WINAPI OpenProcessToken(HANDLE,DWOR
 HANDLE WINAPI OpenSemaphoreA(DWORD,BOOL,LPCSTR);
 HANDLE WINAPI OpenSemaphoreW(DWORD,BOOL,LPCWSTR);
 BOOL WINAPI OpenThreadToken(HANDLE,DWORD,BOOL,PHANDLE);
+HANDLE WINAPI OpenThread(DWORD, BOOL, DWORD);
 HANDLE WINAPI OpenWaitableTimerA(DWORD,BOOL,LPCSTR);
 HANDLE WINAPI OpenWaitableTimerW(DWORD,BOOL,LPCWSTR);
 void WINAPI OutputDebugStringA(LPCSTR);
Index: w32api/lib/kernel32.def
===================================================================
RCS file: /cvs/src/src/winsup/w32api/lib/kernel32.def,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 kernel32.def
--- kernel32.def	2000/02/17 19:38:32	1.1.1.1
+++ kernel32.def	2001/03/18 03:27:36
@@ -492,6 +492,7 @@ OpenProcess@12
 OpenProfileUserMapping@0
 OpenSemaphoreA@12
 OpenSemaphoreW@12
+OpenThread@12
 OpenWaitableTimerA@12
 OpenWaitableTimerW@12
 OutputDebugStringA@4
