On amd64, mark the set_user_ldt() function as static.

On i386, the function is used from the context switch code and needs
to be accessible externally.  Amd64 MD context switch does not lock an
LDT spinlock and inlines switching in assembly.

Discussed with:	bde
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
This commit is contained in:
Konstantin Belousov 2017-10-05 11:50:01 +00:00
parent 37afe7dfd2
commit a1fc6a8c49
2 changed files with 1 additions and 2 deletions

View File

@ -426,7 +426,7 @@ done:
* Update the GDT entry pointing to the LDT to point to the LDT of the
* current process.
*/
void
static void
set_user_ldt(struct mdproc *mdp)
{

View File

@ -88,7 +88,6 @@ struct syscall_args {
(char *)&td; \
} while (0)
void set_user_ldt(struct mdproc *);
struct proc_ldt *user_ldt_alloc(struct proc *, int);
void user_ldt_free(struct thread *);
void user_ldt_deref(struct proc_ldt *);