Add a SIMPLELOCK_INITIALIZER macro, to statically initialize a simplelock,

so that simple_lock_init() is not necessary.
This commit is contained in:
thorpej 1999-04-06 23:08:48 +00:00
parent cadb84965d
commit de38b189e4

View File

@ -1,4 +1,4 @@
/* $NetBSD: lock.h,v 1.17 1999/03/25 00:20:35 sommerfe Exp $ */
/* $NetBSD: lock.h,v 1.18 1999/04/06 23:08:48 thorpej Exp $ */
/*
* Copyright (c) 1995
@ -65,6 +65,12 @@ struct simplelock {
#endif
};
#ifdef LOCKDEBUG
#define SIMPLELOCK_INITIALIZER { 0, NULL, 0, NULL, 0, { NULL, NULL }, 0 }
#else
#define SIMPLELOCK_INITIALIZER { 0 }
#endif
/* XXXCDC: kill typedefs later? */
typedef struct simplelock simple_lock_data_t;
typedef struct simplelock *simple_lock_t;