From: Matthew Dillon Date: Tue, 14 Jul 2009 05:26:53 +0000 (-0700) Subject: MPSAFE - system calls set_tls_area() and get_tls_area() are MPSAFE X-Git-Tag: v2.4.0~453 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/923e469990a7625d4eda2bf63585050cd58f7b67 MPSAFE - system calls set_tls_area() and get_tls_area() are MPSAFE --- diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index 4adfcb46f6..747ab013f2 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -643,8 +643,8 @@ 469 STD BSD { int umtx_sleep(volatile const int *ptr, int value, int timeout); } 470 STD BSD { int umtx_wakeup(volatile const int *ptr, int count); } 471 STD BSD { int jail_attach(int jid); } -472 STD BSD { int set_tls_area(int which, struct tls_info *info, size_t infosize); } -473 STD BSD { int get_tls_area(int which, struct tls_info *info, size_t infosize); } +472 MPSAFE STD BSD { int set_tls_area(int which, struct tls_info *info, size_t infosize); } +473 MPSAFE STD BSD { int get_tls_area(int which, struct tls_info *info, size_t infosize); } 474 MPSAFE STD BSD { int closefrom(int fd); } 475 STD POSIX { int stat(const char *path, struct stat *ub); } 476 STD POSIX { int fstat(int fd, struct stat *sb); } diff --git a/sys/platform/pc32/i386/sys_machdep.c b/sys/platform/pc32/i386/sys_machdep.c index a179d70a78..62f7ba67a3 100644 --- a/sys/platform/pc32/i386/sys_machdep.c +++ b/sys/platform/pc32/i386/sys_machdep.c @@ -242,6 +242,8 @@ done: * * Must be called from a critical section (else an interrupt thread preemption * may cause %gs to fault). Normally called from the low level swtch.s code. + * + * MPSAFE */ void set_user_TLS(void) diff --git a/sys/platform/pc32/i386/tls.c b/sys/platform/pc32/i386/tls.c index e29b7a523e..9451a8b2ac 100644 --- a/sys/platform/pc32/i386/tls.c +++ b/sys/platform/pc32/i386/tls.c @@ -63,6 +63,8 @@ * TLS descriptor or -1 on error. * * (int which, struct tls_info *info, size_t infosize) + * + * MPSAFE */ int sys_set_tls_area(struct set_tls_area_args *uap) @@ -155,6 +157,8 @@ sys_set_tls_area(struct set_tls_area_args *uap) * TLS descriptor or -1 on error. * * (int which, struct tls_info *info, size_t infosize) + * + * MPSAFE */ int sys_get_tls_area(struct get_tls_area_args *uap) diff --git a/sys/platform/pc64/amd64/tls.c b/sys/platform/pc64/amd64/tls.c index e7bdc46051..a0d44319f8 100644 --- a/sys/platform/pc64/amd64/tls.c +++ b/sys/platform/pc64/amd64/tls.c @@ -115,6 +115,8 @@ sys_set_tls_area(struct set_tls_area_args *uap) * TLS descriptor or -1 on error. * * (int which, struct tls_info *info, size_t infosize) + * + * MPSAFE */ int sys_get_tls_area(struct get_tls_area_args *uap) @@ -140,6 +142,8 @@ sys_get_tls_area(struct get_tls_area_args *uap) /* * Install the TLS + * + * MPSAFE */ void set_user_TLS(void) diff --git a/sys/platform/vkernel/i386/tls.c b/sys/platform/vkernel/i386/tls.c index 332a9c659b..13195f8f7c 100644 --- a/sys/platform/vkernel/i386/tls.c +++ b/sys/platform/vkernel/i386/tls.c @@ -62,6 +62,8 @@ * TLS descriptor or -1 on error. * * (struct tls_info *info, int infosize, int which) + * + * MPSAFE */ int sys_set_tls_area(struct set_tls_area_args *uap) @@ -154,6 +156,8 @@ sys_set_tls_area(struct set_tls_area_args *uap) * TLS descriptor or -1 on error. * * (struct tls_info *info, int infosize, int which) + * + * MPSAFE */ int sys_get_tls_area(struct get_tls_area_args *uap)