* sysv_shm.cc (kern_shmat): Add debug_printf's.
This commit is contained in:
		| @@ -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> | 2004-08-24  Corinna Vinschen  <corinna@vinschen.de> | ||||||
|  |  | ||||||
| 	* bsd_mutex.cc (_msleep): Release process object while waiting. | 	* bsd_mutex.cc (_msleep): Release process object while waiting. | ||||||
|   | |||||||
| @@ -382,6 +382,7 @@ kern_shmat(struct thread *td, int shmid, const void *shmaddr, int shmflg) | |||||||
| 	if ((shmflg & SHM_RDONLY) == 0) | 	if ((shmflg & SHM_RDONLY) == 0) | ||||||
| 		prot |= VM_PROT_WRITE; | 		prot |= VM_PROT_WRITE; | ||||||
| 	flags = MAP_ANON | MAP_SHARED; | 	flags = MAP_ANON | MAP_SHARED; | ||||||
|  | 	debug_printf ("shmaddr: %x, shmflg: %x", shmaddr, shmflg); | ||||||
| 	if (shmaddr) { | 	if (shmaddr) { | ||||||
| 		flags |= MAP_FIXED; | 		flags |= MAP_FIXED; | ||||||
| 		if (shmflg & SHM_RND) { | 		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) { | 		} else if (((vm_offset_t)shmaddr & (SHMLBA-1)) == 0) { | ||||||
| 			attach_va = (vm_offset_t)shmaddr; | 			attach_va = (vm_offset_t)shmaddr; | ||||||
| 		} else { | 		} else { | ||||||
|  | 			debug_printf ("Odd shmaddr: EINVAL"); | ||||||
| 			error = EINVAL; | 			error = EINVAL; | ||||||
| 			goto done2; | 			goto done2; | ||||||
| 		} | 		} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user