summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authorjasone <jasone@FreeBSD.org>2000-09-08 21:48:06 +0000
committerjasone <jasone@FreeBSD.org>2000-09-08 21:48:06 +0000
commita54a380435a45b86fa813d9be70d5cd617d5280f (patch)
treefef19fd628a7e5dae3f409c1dfa35f2b943ff380 /sys/kern
parent6c6d26fe034db083d7465e1b31a4a1344b1bcf1c (diff)
downloadFreeBSD-src-a54a380435a45b86fa813d9be70d5cd617d5280f.zip
FreeBSD-src-a54a380435a45b86fa813d9be70d5cd617d5280f.tar.gz
Rename mtx_enter(), mtx_try_enter(), and mtx_exit() and wrap them with cpp
macros that expand to pass filename and line number information. This is necessary since we're using inline functions instead of macros now. Add const to the filename pointers passed througout the mtx and witness code.
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_mutex.c8
-rw-r--r--sys/kern/subr_turnstile.c8
-rw-r--r--sys/kern/subr_witness.c8
3 files changed, 12 insertions, 12 deletions
diff --git a/sys/kern/kern_mutex.c b/sys/kern/kern_mutex.c
index 1ac3f58..3a5fb85 100644
--- a/sys/kern/kern_mutex.c
+++ b/sys/kern/kern_mutex.c
@@ -81,7 +81,7 @@ int witness_watch;
typedef struct witness {
struct witness *w_next;
char *w_description;
- char *w_file;
+ const char *w_file;
int w_line;
struct witness *w_morechildren;
u_char w_childcnt;
@@ -393,7 +393,7 @@ witness_exit(mtx_t *m, int flags, char *file, int line)
}
void
-witness_try_enter(mtx_t *m, int flags, char *file, int line)
+witness_try_enter(mtx_t *m, int flags, const char *file, int line)
{
struct proc *p;
witness_t *w = m->mtx_witness;
@@ -783,14 +783,14 @@ witness_list(struct proc *p)
}
void
-witness_save(mtx_t *m, char **filep, int *linep)
+witness_save(mtx_t *m, const char **filep, int *linep)
{
*filep = m->mtx_witness->w_file;
*linep = m->mtx_witness->w_line;
}
void
-witness_restore(mtx_t *m, char *file, int line)
+witness_restore(mtx_t *m, const char *file, int line)
{
m->mtx_witness->w_file = file;
m->mtx_witness->w_line = line;
diff --git a/sys/kern/subr_turnstile.c b/sys/kern/subr_turnstile.c
index 1ac3f58..3a5fb85 100644
--- a/sys/kern/subr_turnstile.c
+++ b/sys/kern/subr_turnstile.c
@@ -81,7 +81,7 @@ int witness_watch;
typedef struct witness {
struct witness *w_next;
char *w_description;
- char *w_file;
+ const char *w_file;
int w_line;
struct witness *w_morechildren;
u_char w_childcnt;
@@ -393,7 +393,7 @@ witness_exit(mtx_t *m, int flags, char *file, int line)
}
void
-witness_try_enter(mtx_t *m, int flags, char *file, int line)
+witness_try_enter(mtx_t *m, int flags, const char *file, int line)
{
struct proc *p;
witness_t *w = m->mtx_witness;
@@ -783,14 +783,14 @@ witness_list(struct proc *p)
}
void
-witness_save(mtx_t *m, char **filep, int *linep)
+witness_save(mtx_t *m, const char **filep, int *linep)
{
*filep = m->mtx_witness->w_file;
*linep = m->mtx_witness->w_line;
}
void
-witness_restore(mtx_t *m, char *file, int line)
+witness_restore(mtx_t *m, const char *file, int line)
{
m->mtx_witness->w_file = file;
m->mtx_witness->w_line = line;
diff --git a/sys/kern/subr_witness.c b/sys/kern/subr_witness.c
index 1ac3f58..3a5fb85 100644
--- a/sys/kern/subr_witness.c
+++ b/sys/kern/subr_witness.c
@@ -81,7 +81,7 @@ int witness_watch;
typedef struct witness {
struct witness *w_next;
char *w_description;
- char *w_file;
+ const char *w_file;
int w_line;
struct witness *w_morechildren;
u_char w_childcnt;
@@ -393,7 +393,7 @@ witness_exit(mtx_t *m, int flags, char *file, int line)
}
void
-witness_try_enter(mtx_t *m, int flags, char *file, int line)
+witness_try_enter(mtx_t *m, int flags, const char *file, int line)
{
struct proc *p;
witness_t *w = m->mtx_witness;
@@ -783,14 +783,14 @@ witness_list(struct proc *p)
}
void
-witness_save(mtx_t *m, char **filep, int *linep)
+witness_save(mtx_t *m, const char **filep, int *linep)
{
*filep = m->mtx_witness->w_file;
*linep = m->mtx_witness->w_line;
}
void
-witness_restore(mtx_t *m, char *file, int line)
+witness_restore(mtx_t *m, const char *file, int line)
{
m->mtx_witness->w_file = file;
m->mtx_witness->w_line = line;
OpenPOWER on IntegriCloud