- GC pts_fired, and fix the comment about MAX_TIMERS

- Bump MAX_TIMERS to 36 so that we have 32 POSIX user timers which is the
  minimum required.
This commit is contained in:
christos 2016-03-08 05:02:55 +00:00
parent 2ebf0c7f4d
commit 53a91c7008
3 changed files with 6 additions and 8 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: limits.h,v 1.35 2016/02/26 17:10:23 christos Exp $ */
/* $NetBSD: limits.h,v 1.36 2016/03/08 05:02:55 christos Exp $ */
/*
* Copyright (c) 1988, 1993
@ -92,7 +92,7 @@
/* Not yet: PTHREAD_STACK_MIN */
#define PTHREAD_THREADS_MAX _POSIX_THREAD_THREADS_MAX
#define _POSIX_TIMER_MAX 28
#define _POSIX_TIMER_MAX 32
#define _POSIX_TTY_NAME_MAX 9
#define _POSIX_TZNAME_MAX 6

View File

@ -1,4 +1,4 @@
/* $NetBSD: kern_time.c,v 1.184 2016/03/03 01:39:17 uwe Exp $ */
/* $NetBSD: kern_time.c,v 1.185 2016/03/08 05:02:55 christos Exp $ */
/*-
* Copyright (c) 2000, 2004, 2005, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: kern_time.c,v 1.184 2016/03/03 01:39:17 uwe Exp $");
__KERNEL_RCSID(0, "$NetBSD: kern_time.c,v 1.185 2016/03/08 05:02:55 christos Exp $");
#include <sys/param.h>
#include <sys/resourcevar.h>
@ -1200,7 +1200,6 @@ timers_alloc(struct proc *p)
LIST_INIT(&pts->pts_prof);
for (i = 0; i < TIMER_MAX; i++)
pts->pts_timers[i] = NULL;
pts->pts_fired = 0;
mutex_spin_enter(&timer_lock);
if (p->p_timers == NULL) {
p->p_timers = pts;

View File

@ -1,4 +1,4 @@
/* $NetBSD: timevar.h,v 1.35 2016/02/26 17:08:58 christos Exp $ */
/* $NetBSD: timevar.h,v 1.36 2016/03/08 05:02:55 christos Exp $ */
/*
* Copyright (c) 2005, 2008 The NetBSD Foundation.
@ -94,7 +94,7 @@ struct ptimer {
#define TIMER_MIN 4 /* [0..3] are reserved for setitimer(2) */
/* REAL=0,VIRTUAL=1,PROF=2,MONOTONIC=3 */
#define TIMER_MAX 32 /* See ptimers->pts_fired if you enlarge this */
#define TIMER_MAX 36 /* 32 is minimum user timers per POSIX */
#define TIMERS_ALL 0
#define TIMERS_POSIX 1
@ -104,7 +104,6 @@ struct ptimers {
struct ptlist pts_virtual;
struct ptlist pts_prof;
struct ptimer *pts_timers[TIMER_MAX];
int pts_fired;
};
/*