OSDN Git Service

* sysv_shm.cc (kern_shmat): Add debug_printf's.
authorcorinna <corinna>
Tue, 31 Aug 2004 10:47:27 +0000 (10:47 +0000)
committercorinna <corinna>
Tue, 31 Aug 2004 10:47:27 +0000 (10:47 +0000)
winsup/cygserver/ChangeLog
winsup/cygserver/sysv_shm.cc

index 6de3a94..8f373e0 100644 (file)
@@ -1,3 +1,7 @@
+2004-08-31  Corinna Vinschen  <corinna@vinschen.de>
+
+       * sysv_shm.cc (kern_shmat): Add debug_printf's.
+
 2004-08-24  Corinna Vinschen  <corinna@vinschen.de>
 
        * bsd_mutex.cc (_msleep): Release process object while waiting.
index 803e439..5daeb5c 100644 (file)
@@ -382,6 +382,7 @@ kern_shmat(struct thread *td, int shmid, const void *shmaddr, int shmflg)
        if ((shmflg & SHM_RDONLY) == 0)
                prot |= VM_PROT_WRITE;
        flags = MAP_ANON | MAP_SHARED;
+       debug_printf ("shmaddr: %x, shmflg: %x", shmaddr, shmflg);
        if (shmaddr) {
                flags |= MAP_FIXED;
                if (shmflg & SHM_RND) {
@@ -389,6 +390,7 @@ kern_shmat(struct thread *td, int shmid, const void *shmaddr, int shmflg)
                } else if (((vm_offset_t)shmaddr & (SHMLBA-1)) == 0) {
                        attach_va = (vm_offset_t)shmaddr;
                } else {
+                       debug_printf ("Odd shmaddr: EINVAL");
                        error = EINVAL;
                        goto done2;
                }