summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_thr.c
diff options
context:
space:
mode:
authordas <das@FreeBSD.org>2004-11-20 23:00:59 +0000
committerdas <das@FreeBSD.org>2004-11-20 23:00:59 +0000
commit6175c08488edf2a144f21145ecb8c7ced37c3bbb (patch)
treeeaa83ea2ab9f7a13934ceeef53104c6151eae2c3 /sys/kern/kern_thr.c
parentfeeee6f8b5e72ea3f0baa19c2a36457d49e50784 (diff)
downloadFreeBSD-src-6175c08488edf2a144f21145ecb8c7ced37c3bbb.zip
FreeBSD-src-6175c08488edf2a144f21145ecb8c7ced37c3bbb.tar.gz
Remove local definitions of RANGEOF() and use __rangeof() instead.
Also remove a few bogus casts.
Diffstat (limited to 'sys/kern/kern_thr.c')
-rw-r--r--sys/kern/kern_thr.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/sys/kern/kern_thr.c b/sys/kern/kern_thr.c
index 402667a..baa9224 100644
--- a/sys/kern/kern_thr.c
+++ b/sys/kern/kern_thr.c
@@ -58,12 +58,6 @@ SYSCTL_INT(_kern_threads, OID_AUTO, thr_concurrency, CTLFLAG_RW,
&thr_concurrency, 0, "a concurrency value if not default");
/*
- * Back end support functions.
- */
-
-#define RANGEOF(type, start, end) (offsetof(type, end) - offsetof(type, start))
-
-/*
* System call interface.
*/
int
@@ -109,15 +103,15 @@ thr_create(struct thread *td, struct thr_create_args *uap)
}
bzero(&newtd->td_startzero,
- (unsigned) RANGEOF(struct thread, td_startzero, td_endzero));
+ __rangeof(struct thread, td_startzero, td_endzero));
bcopy(&td->td_startcopy, &newtd->td_startcopy,
- (unsigned) RANGEOF(struct thread, td_startcopy, td_endcopy));
+ __rangeof(struct thread, td_startcopy, td_endcopy));
if (scope_sys) {
bzero(&newkg->kg_startzero,
- (unsigned)RANGEOF(struct ksegrp, kg_startzero, kg_endzero));
+ __rangeof(struct ksegrp, kg_startzero, kg_endzero));
bcopy(&kg->kg_startcopy, &newkg->kg_startcopy,
- (unsigned)RANGEOF(struct ksegrp, kg_startcopy, kg_endcopy));
+ __rangeof(struct ksegrp, kg_startcopy, kg_endcopy));
}
newtd->td_proc = td->td_proc;
OpenPOWER on IntegriCloud