aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/sx.h
diff options
context:
space:
mode:
authorJason Evans <jasone@FreeBSD.org>2001-08-13 21:25:30 +0000
committerJason Evans <jasone@FreeBSD.org>2001-08-13 21:25:30 +0000
commitd55229b72ecc97075f1afcd976f8e0c1cd0d662b (patch)
tree67194a60468f548a491adff90351cbea4c362c47 /sys/sys/sx.h
parent9c347fa6263ae87ab59c560c9a8c6b362001000e (diff)
downloadsrc-d55229b72ecc97075f1afcd976f8e0c1cd0d662b.tar.gz
src-d55229b72ecc97075f1afcd976f8e0c1cd0d662b.zip
Add sx_try_upgrade() and sx_downgrade().
Submitted by: Alexander Kabaev <ak03@gte.com>
Notes
Notes: svn path=/head/; revision=81599
Diffstat (limited to 'sys/sys/sx.h')
-rw-r--r--sys/sys/sx.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/sys/sx.h b/sys/sys/sx.h
index f123a3f88402..ee6ac736d653 100644
--- a/sys/sys/sx.h
+++ b/sys/sys/sx.h
@@ -54,6 +54,8 @@ int _sx_try_slock(struct sx *sx, const char *file, int line);
int _sx_try_xlock(struct sx *sx, const char *file, int line);
void _sx_sunlock(struct sx *sx, const char *file, int line);
void _sx_xunlock(struct sx *sx, const char *file, int line);
+int _sx_try_upgrade(struct sx *sx, const char *file, int line);
+void _sx_downgrade(struct sx *sx, const char *file, int line);
#define sx_slock(sx) _sx_slock((sx), __FILE__, __LINE__)
#define sx_xlock(sx) _sx_xlock((sx), __FILE__, __LINE__)
@@ -61,6 +63,8 @@ void _sx_xunlock(struct sx *sx, const char *file, int line);
#define sx_try_xlock(sx) _sx_try_xlock((sx), __FILE__, __LINE__)
#define sx_sunlock(sx) _sx_sunlock((sx), __FILE__, __LINE__)
#define sx_xunlock(sx) _sx_xunlock((sx), __FILE__, __LINE__)
+#define sx_try_upgrade(sx) _sx_try_upgrade((sx), __FILE__, __LINE__)
+#define sx_downgrade(sx) _sx_downgrade((sx), __FILE__, __LINE__)
#ifdef INVARIANTS
/*