Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F166591447
D6655.id17138.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D6655.id17138.diff
View Options
Index: sys/compat/freebsd32/freebsd32_ipc.h
===================================================================
--- sys/compat/freebsd32/freebsd32_ipc.h
+++ sys/compat/freebsd32/freebsd32_ipc.h
@@ -72,7 +72,7 @@
int32_t shm_segsz;
pid_t shm_lpid;
pid_t shm_cpid;
- int shm_nattch;
+ unsigned int shm_nattch;
int32_t shm_atime;
int32_t shm_dtime;
int32_t shm_ctime;
Index: sys/kern/sysv_shm.c
===================================================================
--- sys/kern/sysv_shm.c
+++ sys/kern/sysv_shm.c
@@ -275,7 +275,7 @@
return (EINVAL);
shmmap_s->shmid = -1;
shmseg->u.shm_dtime = time_second;
- if ((--shmseg->u.shm_nattch <= 0) &&
+ if (--shmseg->u.shm_nattch == 0 &&
(shmseg->u.shm_perm.mode & SHMSEG_REMOVED)) {
shm_deallocate_segment(shmseg);
shm_last_free = segnum;
@@ -289,7 +289,7 @@
shmseg->u.shm_perm.key = IPC_PRIVATE;
shmseg->u.shm_perm.mode |= SHMSEG_REMOVED;
- if (shmseg->u.shm_nattch <= 0) {
+ if (shmseg->u.shm_nattch == 0) {
shm_deallocate_segment(shmseg);
shm_last_free = segnum;
}
Index: sys/sys/shm.h
===================================================================
--- sys/sys/shm.h
+++ sys/sys/shm.h
@@ -90,12 +90,14 @@
};
#endif
+typedef unsigned int shmatt_t;
+
struct shmid_ds {
struct ipc_perm shm_perm; /* operation permission structure */
size_t shm_segsz; /* size of segment in bytes */
pid_t shm_lpid; /* process ID of last shared memory op */
pid_t shm_cpid; /* process ID of creator */
- int shm_nattch; /* number of current attaches */
+ shmatt_t shm_nattch; /* number of current attaches */
time_t shm_atime; /* time of last shmat() */
time_t shm_dtime; /* time of last shmdt() */
time_t shm_ctime; /* time of last change by shmctl() */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Aug 15, 6:56 PM (54 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
36791016
Default Alt Text
D6655.id17138.diff (1 KB)
Attached To
Mode
D6655: Add shmatt_t.
Attached
Detach File
Event Timeline
Log In to Comment