Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/compat/linux/common



On Mon, Jan 28, 2008 at 07:11:45PM +0000, Mindaugas R. wrote:
> > Module Name:        src
> > Committed By:       njoly
> > Date:               Mon Jan 28 14:05:32 UTC 2008
> > 
> > Modified Files:
> >     src/sys/compat/linux/common: linux_ipc.c
> > 
> > Log Message:
> > shmctl fixes.
> > 
> > - SHM_STAT take an index as input, and return the corresponding shmid.
> > - IPC_INFO and SHM_INFO returns the highest used index.
> > - SHM_INFO expected the total used pages (not bytes) in shm_tot field
> >   of struct shm_info.
> > 
> > 
> > To generate a diff of this commit:
> > cvs rdiff -r1.42 -r1.43 src/sys/compat/linux/common/linux_ipc.c
> 
> Actually, this code is not MP-safe, that is, usage of shmsegs without
> shm_lock held. Additionally, it does not take into account the case of
> reallocation. Usage of shmsegs/shm_lock in compat code do not look good,
> perhaps some cases might be moved to the native module? I am not sure..

Right. I'll think about it.

> > Modified Files:
> >     src/sys/compat/linux/common: linux_shm.h
> > 
> > Log Message:
> > Update struct linux_shmid64_ds for 64bits archs.
> > - shm_segsz should be of type size_t, not int.
> 
> Why l_shm_segsz in struct linux_shmid_ds is not size_t too?

Because Linux use an int, not a size_t (linux/shm.h).

-- 
Nicolas Joly

Biological Software and Databanks.
Institut Pasteur, Paris.



Home | Main Index | Thread Index | Old Index