summaryrefslogtreecommitdiffstats
path: root/sys/compat/linux/linux_futex.h
Commit message (Collapse)AuthorAgeFilesLines
* MFC r283383:dchagin2016-01-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Switch linuxulator to use the native 1:1 threads. The reasons: 1. Get rid of the stubs/quirks with process dethreading, process reparent when the process group leader exits and close to this problems on wait(), waitpid(), etc. 2. Reuse our kernel code instead of writing excessive thread managment routines in Linuxulator. Implementation details: 1. The thread is created via kern_thr_new() in the clone() call with the CLONE_THREAD parameter. Thus, everything else is a process. 2. The test that the process has a threads is done via P_HADTHREADS bit p_flag of struct proc. 3. Per thread emulator state data structure is now located in the struct thread and freed in the thread_dtor() hook. Mandatory holdig of the p_mtx required when referencing emuldata from the other threads. 4. PID mangling has changed. Now Linux pid is the native tid and Linux tgid is the native pid, with the exception of the first thread in the process where tid and pid are one and the same. Ugliness: In case when the Linux thread is the initial thread in the thread group thread id is equal to the process id. Glibc depends on this magic (assert in pthread_getattr_np.c). So for system calls that take thread id as a parameter we should use the special method to reference struct thread.
* Yet another unimplemented futex operation, print out about.dchagin2011-01-311-0/+1
| | | | | Submitted by: arundel MFC after: 1 month.
* Implement a futex BITSET op.dchagin2011-01-311-0/+2
| | | | | Submitted by: arundel MFC after: 1 month.
* - print out the PID and program name of the program trying to use annetchild2010-11-151-9/+12
| | | | | | | | | | | | | | | | | unsupported futex operation - for those futex operations which are known to be not supported, print out which futex operation it is - shortcut the error return of the unsupported FUTEX_CLOCK_REALTIME in some cases: FUTEX_CLOCK_REALTIME can be used to tell linux to use CLOCK_REALTIME instead of CLOCK_MONOTONIC. FUTEX_CLOCK_REALTIME however must only be set, if either FUTEX_WAIT_BITSET or FUTEX_WAIT_REQUEUE_PI are set too. If that's not the case we can die with ENOSYS right at the beginning. Submitted by: arundel Reviewed by: rdivacky (earlier iteration of the patch) MFC after: 1 week
* Move extern variable definitions to the header file.dchagin2009-05-021-0/+3
| | | | | Approved by: kib (mentor) MFC after: 1 month
* Ignore FUTEX_FD op, as it is done by linux.dchagin2009-03-151-1/+1
| | | | | Approved by: kib (mentor) MFC after: 2 weeks
* Make robust futexes work on linux32/amd64. Use PTRIN to readkib2008-10-141-12/+0
| | | | | | | | user-mode pointers. Change types used in the structures definitions to properly-sized architecture-specific types. Submitted by: dchagin MFC after: 1 week
* Implement robust futexes. Most of the code is modelled afterrdivacky2008-05-131-0/+18
| | | | | | | | | | | what Linux does. This is because robust futexes are mostly userspace thing which we cannot alter. Two syscalls maintain pointer to userspace list and when process exits a routine walks this list waking up processes sleeping on futexes from that list. Reviewed by: kib (mentor) MFC after: 1 month
* o Add stub support for some new futex operations,rdivacky2008-03-201-0/+5
| | | | | | | | | | | | | | | | | so the annoying message is not printed. o Don't warn about FUTEX_FD not being implemented and return ENOSYS instead of 0 (eg. success). o Clear FUTEX_PRIVATE_FLAG as we actually implement only private futexes so there is no reason to return ENOSYS when app asks for a private futex. We don't reject shared futexes because they worked just fine with our implementation so far. Approved by: kib (mentor) Tested by: bsam MFC after: 1 week
* MFp4 (110523, parts which apply cleanly):netchild2007-02-251-19/+19
| | | | | | | | | semi-automatic style(9) The futex stuff already differs a lot (only a small part does not differ) from NetBSD, so we are already way off and can't apply changes from NetBSD automatically. As we need to merge everything by hand already, we can even make the files comply to our world order.
* Add some new files needed for linux 2.6.x compatibility.netchild2006-08-151-0/+61
Please don't style(9) the NetBSD code, we want to stay in sync. Not imported on a vendor branch since we need local changes. Sponsored by: Google SoC 2006 Submitted by: rdivacky With help from: manu@NetBSD.org Obtained from: NetBSD (linux_{futex,time}.*)
OpenPOWER on IntegriCloud