Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2004-03-02 14:08:35 +0300
committerCorinna Vinschen <corinna@vinschen.de>2004-03-02 14:08:35 +0300
commitddb1a4c10afbf2e9af6047d7e844c9d0330dbaa0 (patch)
tree391297e551392c4675de84bb39539e8ca729f6e0 /winsup/cygserver
parentb06a028bf010f9db19fff134b009c1c77db6d251 (diff)
* sysv_sem.cc (semundo_adjust): Check for process id instead of
process struct pointer, which isn't fixed under Cygwin. (semexit_myhook): Ditto. Adjust debug print statements to print Cygwin and Windows PIDs instead of process pointer under Cygwin.
Diffstat (limited to 'winsup/cygserver')
-rw-r--r--winsup/cygserver/ChangeLog7
-rw-r--r--winsup/cygserver/sysv_sem.cc19
2 files changed, 26 insertions, 0 deletions
diff --git a/winsup/cygserver/ChangeLog b/winsup/cygserver/ChangeLog
index d0a9f5725..761056afa 100644
--- a/winsup/cygserver/ChangeLog
+++ b/winsup/cygserver/ChangeLog
@@ -1,3 +1,10 @@
+2004-03-02 Corinna Vinschen <corinna@vinschen.de>
+
+ * sysv_sem.cc (semundo_adjust): Check for process id instead of
+ process struct pointer, which isn't fixed under Cygwin.
+ (semexit_myhook): Ditto. Adjust debug print statements to print
+ Cygwin and Windows PIDs instead of process pointer under Cygwin.
+
2004-02-07 Corinna Vinschen <corinna@vinschen.de>
* bsd_mutex.cc (win_priority): Move to msleep helper function section.
diff --git a/winsup/cygserver/sysv_sem.cc b/winsup/cygserver/sysv_sem.cc
index ccb7a1246..bcb312d58 100644
--- a/winsup/cygserver/sysv_sem.cc
+++ b/winsup/cygserver/sysv_sem.cc
@@ -419,7 +419,11 @@ semundo_adjust(struct thread *td, struct sem_undo **supptr, int semid,
suptr = *supptr;
if (suptr == NULL) {
SLIST_FOREACH(suptr, &semu_list, un_next) {
+#ifdef __CYGWIN__
+ if (suptr->un_proc->cygpid == p->cygpid) {
+#else
if (suptr->un_proc == p) {
+#endif
*supptr = suptr;
break;
}
@@ -1244,7 +1248,11 @@ semexit_myhook(void *arg, struct proc *p)
*/
SEMUNDO_HOOKLOCK();
SLIST_FOREACH_PREVPTR(suptr, supptr, &semu_list, un_next) {
+#ifdef __CYGWIN__
+ if (suptr->un_proc->cygpid == p->cygpid)
+#else
if (suptr->un_proc == p)
+#endif
break;
}
SEMUNDO_UNLOCK();
@@ -1252,8 +1260,13 @@ semexit_myhook(void *arg, struct proc *p)
if (suptr == NULL)
return;
+#ifdef __CYGWIN__
+ DPRINTF(("proc @%u(%u) has undo structure with %d entries\n",
+ p->cygpid, p->winpid, suptr->un_cnt));
+#else
DPRINTF(("proc @%08x has undo structure with %d entries\n", p,
suptr->un_cnt));
+#endif
/*
* If there are any active undo elements then process them.
@@ -1282,8 +1295,14 @@ semexit_myhook(void *arg, struct proc *p)
panic("semexit - semnum out of range");
DPRINTF((
+#ifdef __CYGWIN__
+ "semexit: %u(%u) id=%d num=%d(adj=%d) ; sem=%d\n",
+ suptr->un_proc->cygpid, suptr->un_proc->winpid,
+ suptr->un_ent[ix].un_id,
+#else
"semexit: %08x id=%d num=%d(adj=%d) ; sem=%d\n",
suptr->un_proc, suptr->un_ent[ix].un_id,
+#endif
suptr->un_ent[ix].un_num,
suptr->un_ent[ix].un_adjval,
semaptr->sem_base[semnum].semval));