[Midnightbsd-cvs] src [7472] trunk/lib/libthr/thread/thr_umtx.c: microoptimization: make two vars during init const.
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Fri Mar 18 20:04:18 EDT 2016
Revision: 7472
http://svnweb.midnightbsd.org/src/?rev=7472
Author: laffer1
Date: 2016-03-18 20:04:17 -0400 (Fri, 18 Mar 2016)
Log Message:
-----------
microoptimization: make two vars during init const.
Modified Paths:
--------------
trunk/lib/libthr/thread/thr_umtx.c
Modified: trunk/lib/libthr/thread/thr_umtx.c
===================================================================
--- trunk/lib/libthr/thread/thr_umtx.c 2016-03-17 13:06:23 UTC (rev 7471)
+++ trunk/lib/libthr/thread/thr_umtx.c 2016-03-19 00:04:17 UTC (rev 7472)
@@ -42,7 +42,7 @@
void
_thr_umutex_init(struct umutex *mtx)
{
- static struct umutex default_mtx = DEFAULT_UMUTEX;
+ static const struct umutex default_mtx = DEFAULT_UMUTEX;
*mtx = default_mtx;
}
@@ -50,7 +50,7 @@
void
_thr_urwlock_init(struct urwlock *rwl)
{
- static struct urwlock default_rwl = DEFAULT_URWLOCK;
+ static const struct urwlock default_rwl = DEFAULT_URWLOCK;
*rwl = default_rwl;
}
More information about the Midnightbsd-cvs
mailing list