cvs commit: src/sys/netipsec key.c
Pawel Jakub Dawidek
pjd at FreeBSD.org
Sat May 20 08:36:11 PDT 2006
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
More information about the cvs-src
mailing list