Date: Sat, 20 May 2006 15:35:37 +0000 (UTC) From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/netipsec key.c Message-ID: <200605201535.k4KFZbmj061257@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
pjd 2006-05-20 15:35:37 UTC
FreeBSD src repository
Modified files:
sys/netipsec key.c
Log:
Prevent disappearing SAD entries by implementing MPsafe refcounting.
"Why didn't he use SECASVAR_LOCK()/SECASVAR_UNLOCK() macros to
synchronize access to the secasvar structure's fields?" one may ask.
There were two reasons:
1. refcount(9) is faster then mutex(9) synchronization (one atomic
operation instead of two).
2. Those macros are not used now at all, so at some point we may decide
to remove them entirely.
OK'ed by: gnn
MFC after: 2 weeks
Revision Changes Path
1.22 +33 -20 src/sys/netipsec/key.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200605201535.k4KFZbmj061257>
