Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/uipc_shm.c
| Show First 20 Lines • Show All 1,032 Lines • ▼ Show 20 Lines | shm_unmap(struct file *fp, void *mem, size_t size) | ||||
| VM_OBJECT_WLOCK(obj); | VM_OBJECT_WLOCK(obj); | ||||
| KASSERT(shmfd->shm_kmappings > 0, ("shm_unmap: object not mapped")); | KASSERT(shmfd->shm_kmappings > 0, ("shm_unmap: object not mapped")); | ||||
| shmfd->shm_kmappings--; | shmfd->shm_kmappings--; | ||||
| VM_OBJECT_WUNLOCK(obj); | VM_OBJECT_WUNLOCK(obj); | ||||
| return (0); | return (0); | ||||
| } | } | ||||
| static int | static int | ||||
| shm_fill_kinfo(struct file *fp, struct kinfo_file *kif, struct filedesc *fdp) | shm_fill_kinfo(struct file *fp, struct kinfo_file *kif, struct filedesc *fdp, int lkflags) | ||||
| { | { | ||||
| struct shmfd *shmfd; | struct shmfd *shmfd; | ||||
| kif->kf_type = KF_TYPE_SHM; | kif->kf_type = KF_TYPE_SHM; | ||||
| shmfd = fp->f_data; | shmfd = fp->f_data; | ||||
| mtx_lock(&shm_timestamp_lock); | mtx_lock(&shm_timestamp_lock); | ||||
| kif->kf_un.kf_file.kf_file_mode = S_IFREG | shmfd->shm_mode; /* XXX */ | kif->kf_un.kf_file.kf_file_mode = S_IFREG | shmfd->shm_mode; /* XXX */ | ||||
| Show All 11 Lines | |||||