]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Make the LinuxKPI task struct persistent accross system calls.
authorHans Petter Selasky <hselasky@FreeBSD.org>
Tue, 21 Feb 2017 12:43:02 +0000 (12:43 +0000)
committerHans Petter Selasky <hselasky@FreeBSD.org>
Tue, 21 Feb 2017 12:43:02 +0000 (12:43 +0000)
commit1e3db1de0cf6b904373e0f4c9e738b9713f3e17b
tree9c3eb36eac0b6065dcb12dfdf875957ee7c51293
parent27569d019d4edb44094fab5f2fa60ad2b8b03bb7
Make the LinuxKPI task struct persistent accross system calls.

A set of helper functions have been added to manage the life of the
LinuxKPI task struct. When an external system call or task is invoked,
a check is made to create the task struct by demand. A thread
destructor callback is registered to free the task struct when a
thread exits to avoid memory leaks.

This change lays the ground for emulating the Linux kernel more
closely which is a dependency by the code using the LinuxKPI APIs.

Add new dedicated td_lkpi_task field has been added to struct thread
instead of abusing td_retval[1].

Fix some header file inclusions to make LINT kernel build properly
after this change.

Bump the __FreeBSD_version to force a rebuild of all kernel modules.

MFC after: 1 week
Sponsored by: Mellanox Technologies
22 files changed:
sys/compat/linuxkpi/common/include/linux/bitops.h
sys/compat/linuxkpi/common/include/linux/compat.h
sys/compat/linuxkpi/common/include/linux/file.h
sys/compat/linuxkpi/common/include/linux/jiffies.h
sys/compat/linuxkpi/common/include/linux/kdev_t.h
sys/compat/linuxkpi/common/include/linux/kernel.h
sys/compat/linuxkpi/common/include/linux/kthread.h
sys/compat/linuxkpi/common/include/linux/rwlock.h
sys/compat/linuxkpi/common/include/linux/rwsem.h
sys/compat/linuxkpi/common/include/linux/sched.h
sys/compat/linuxkpi/common/include/linux/semaphore.h
sys/compat/linuxkpi/common/include/linux/spinlock.h
sys/compat/linuxkpi/common/include/linux/types.h
sys/compat/linuxkpi/common/include/linux/wait.h
sys/compat/linuxkpi/common/src/linux_compat.c
sys/compat/linuxkpi/common/src/linux_current.c [new file with mode: 0644]
sys/compat/linuxkpi/common/src/linux_kthread.c [new file with mode: 0644]
sys/compat/linuxkpi/common/src/linux_pci.c
sys/conf/files
sys/modules/linuxkpi/Makefile
sys/sys/param.h
sys/sys/proc.h