Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Don't nest struct undo and change it to sem_undo_entry
details: https://anonhg.NetBSD.org/src/rev/bd139c5779f6
branches: trunk
changeset: 332037:bd139c5779f6
user: matt <matt%NetBSD.org@localhost>
date: Fri Sep 05 05:54:48 2014 +0000
description:
Don't nest struct undo and change it to sem_undo_entry
diffstat:
sys/kern/sysv_sem.c | 8 ++++----
sys/sys/sem.h | 16 +++++++++-------
2 files changed, 13 insertions(+), 11 deletions(-)
diffs (77 lines):
diff -r 3fd690676b0a -r bd139c5779f6 sys/kern/sysv_sem.c
--- a/sys/kern/sysv_sem.c Fri Sep 05 05:52:27 2014 +0000
+++ b/sys/kern/sysv_sem.c Fri Sep 05 05:54:48 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sysv_sem.c,v 1.90 2014/02/25 18:30:11 pooka Exp $ */
+/* $NetBSD: sysv_sem.c,v 1.91 2014/09/05 05:54:48 matt Exp $ */
/*-
* Copyright (c) 1999, 2007 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sysv_sem.c,v 1.90 2014/02/25 18:30:11 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sysv_sem.c,v 1.91 2014/09/05 05:54:48 matt Exp $");
#define SYSVSEM
@@ -344,7 +344,7 @@
int adjval)
{
struct sem_undo *suptr;
- struct undo *sunptr;
+ struct sem_undo_entry *sunptr;
int i;
KASSERT(mutex_owned(&semlock));
@@ -402,7 +402,7 @@
semundo_clear(int semid, int semnum)
{
struct sem_undo *suptr;
- struct undo *sunptr, *sunend;
+ struct sem_undo_entry *sunptr, *sunend;
KASSERT(mutex_owned(&semlock));
diff -r 3fd690676b0a -r bd139c5779f6 sys/sys/sem.h
--- a/sys/sys/sem.h Fri Sep 05 05:52:27 2014 +0000
+++ b/sys/sys/sem.h Fri Sep 05 05:54:48 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sem.h,v 1.29 2009/01/19 19:39:41 christos Exp $ */
+/* $NetBSD: sem.h,v 1.30 2014/09/05 05:54:48 matt Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -102,15 +102,17 @@
/*
* Undo structure (one per process)
*/
+struct sem_undo_entry {
+ short un_adjval; /* adjust on exit values */
+ short un_num; /* semaphore # */
+ int un_id; /* semid */
+};
+
struct sem_undo {
struct sem_undo *un_next; /* ptr to next active undo structure */
struct proc *un_proc; /* owner of this structure */
short un_cnt; /* # of active entries */
- struct undo {
- short un_adjval; /* adjust on exit values */
- short un_num; /* semaphore # */
- int un_id; /* semid */
- } un_ent[1]; /* undo entries */
+ struct sem_undo_entry un_ent[1];/* undo entries */
};
#endif /* _KERNEL */
@@ -183,7 +185,7 @@
#endif
/* actual size of an undo structure */
-#define SEMUSZ (sizeof(struct sem_undo)+sizeof(struct undo)*SEMUME)
+#define SEMUSZ (sizeof(struct sem_undo)+sizeof(struct sem_undo_entry)*SEMUME)
/*
* Structures allocated in machdep.c
Home |
Main Index |
Thread Index |
Old Index