<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/uapi/linux/ntsync.h, branch v6.19.11</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-01-08T12:18:11+00:00</updated>
<entry>
<title>ntsync: Introduce alertable waits.</title>
<updated>2025-01-08T12:18:11+00:00</updated>
<author>
<name>Elizabeth Figura</name>
<email>zfigura@codeweavers.com</email>
</author>
<published>2024-12-13T19:34:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a138179a59d47690b069fbded1be12f47648ef07'/>
<id>urn:sha1:a138179a59d47690b069fbded1be12f47648ef07</id>
<content type='text'>
NT waits can optionally be made "alertable". This is a special channel for
thread wakeup that is mildly similar to SIGIO. A thread has an internal single
bit of "alerted" state, and if a thread is alerted while an alertable wait, the
wait will return a special value, consume the "alerted" state, and will not
consume any of its objects.

Alerts are implemented using events; the user-space NT emulator is expected to
create an internal ntsync event for each thread and pass that event to wait
functions.

Signed-off-by: Elizabeth Figura &lt;zfigura@codeweavers.com&gt;
Acked-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Link: https://lore.kernel.org/r/20241213193511.457338-16-zfigura@codeweavers.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ntsync: Introduce NTSYNC_IOC_EVENT_READ.</title>
<updated>2025-01-08T12:18:11+00:00</updated>
<author>
<name>Elizabeth Figura</name>
<email>zfigura@codeweavers.com</email>
</author>
<published>2024-12-13T19:34:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e864071a630cfbbd55251e7b45461003f4f79877'/>
<id>urn:sha1:e864071a630cfbbd55251e7b45461003f4f79877</id>
<content type='text'>
This corresponds to the NT syscall NtQueryEvent().

This returns the signaled state of the event and whether it is manual-reset.

Signed-off-by: Elizabeth Figura &lt;zfigura@codeweavers.com&gt;
Link: https://lore.kernel.org/r/20241213193511.457338-15-zfigura@codeweavers.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ntsync: Introduce NTSYNC_IOC_MUTEX_READ.</title>
<updated>2025-01-08T12:18:11+00:00</updated>
<author>
<name>Elizabeth Figura</name>
<email>zfigura@codeweavers.com</email>
</author>
<published>2024-12-13T19:34:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0b3c31449d28c83c0b8a8a7be569aa30d70b7764'/>
<id>urn:sha1:0b3c31449d28c83c0b8a8a7be569aa30d70b7764</id>
<content type='text'>
This corresponds to the NT syscall NtQueryMutant().

This returns the recursion count, owner, and abandoned state of the mutex.

Signed-off-by: Elizabeth Figura &lt;zfigura@codeweavers.com&gt;
Link: https://lore.kernel.org/r/20241213193511.457338-14-zfigura@codeweavers.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ntsync: Introduce NTSYNC_IOC_SEM_READ.</title>
<updated>2025-01-08T12:18:11+00:00</updated>
<author>
<name>Elizabeth Figura</name>
<email>zfigura@codeweavers.com</email>
</author>
<published>2024-12-13T19:34:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a948f4177c3cce5f27648696da95c62c0253a099'/>
<id>urn:sha1:a948f4177c3cce5f27648696da95c62c0253a099</id>
<content type='text'>
This corresponds to the NT syscall NtQuerySemaphore().

This returns the current count and maximum count of the semaphore.

Signed-off-by: Elizabeth Figura &lt;zfigura@codeweavers.com&gt;
Link: https://lore.kernel.org/r/20241213193511.457338-13-zfigura@codeweavers.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ntsync: Introduce NTSYNC_IOC_EVENT_PULSE.</title>
<updated>2025-01-08T12:18:11+00:00</updated>
<author>
<name>Elizabeth Figura</name>
<email>zfigura@codeweavers.com</email>
</author>
<published>2024-12-13T19:34:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=12b29d3008e6bd5118af716ae2971fe6823b117a'/>
<id>urn:sha1:12b29d3008e6bd5118af716ae2971fe6823b117a</id>
<content type='text'>
This corresponds to the NT syscall NtPulseEvent().

This wakes up any waiters as if the event had been set, but does not set the
event, instead resetting it if it had been signalled. Thus, for a manual-reset
event, all waiters are woken, whereas for an auto-reset event, at most one
waiter is woken.

Signed-off-by: Elizabeth Figura &lt;zfigura@codeweavers.com&gt;
Acked-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Link: https://lore.kernel.org/r/20241213193511.457338-12-zfigura@codeweavers.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ntsync: Introduce NTSYNC_IOC_EVENT_RESET.</title>
<updated>2025-01-08T12:18:11+00:00</updated>
<author>
<name>Elizabeth Figura</name>
<email>zfigura@codeweavers.com</email>
</author>
<published>2024-12-13T19:34:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bbb9797514b20c316314b78a439f87fd16b7c509'/>
<id>urn:sha1:bbb9797514b20c316314b78a439f87fd16b7c509</id>
<content type='text'>
This corresponds to the NT syscall NtResetEvent().

This sets the event to the unsignaled state, and returns its previous state.

Signed-off-by: Elizabeth Figura &lt;zfigura@codeweavers.com&gt;
Acked-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Link: https://lore.kernel.org/r/20241213193511.457338-11-zfigura@codeweavers.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ntsync: Introduce NTSYNC_IOC_EVENT_SET.</title>
<updated>2025-01-08T12:18:11+00:00</updated>
<author>
<name>Elizabeth Figura</name>
<email>zfigura@codeweavers.com</email>
</author>
<published>2024-12-13T19:34:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2dcba6fc15a442b1cf1df8cdd0da12f20db38c43'/>
<id>urn:sha1:2dcba6fc15a442b1cf1df8cdd0da12f20db38c43</id>
<content type='text'>
This corresponds to the NT syscall NtSetEvent().

This sets the event to the signaled state, and returns its previous state.

Signed-off-by: Elizabeth Figura &lt;zfigura@codeweavers.com&gt;
Link: https://lore.kernel.org/r/20241213193511.457338-10-zfigura@codeweavers.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ntsync: Introduce NTSYNC_IOC_CREATE_EVENT.</title>
<updated>2025-01-08T12:18:11+00:00</updated>
<author>
<name>Elizabeth Figura</name>
<email>zfigura@codeweavers.com</email>
</author>
<published>2024-12-13T19:34:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4c7404b9c2b572b42dc63bfde5e862290dab53b5'/>
<id>urn:sha1:4c7404b9c2b572b42dc63bfde5e862290dab53b5</id>
<content type='text'>
This correspond to the NT syscall NtCreateEvent().

An NT event holds a single bit of state denoting whether it is signaled or
unsignaled.

There are two types of events: manual-reset and automatic-reset. When an
automatic-reset event is acquired via a wait function, its state is reset to
unsignaled. Manual-reset events are not affected by wait functions.

Whether the event is manual-reset, and its initial state, are specified at
creation time.

Signed-off-by: Elizabeth Figura &lt;zfigura@codeweavers.com&gt;
Link: https://lore.kernel.org/r/20241213193511.457338-9-zfigura@codeweavers.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ntsync: Introduce NTSYNC_IOC_MUTEX_KILL.</title>
<updated>2025-01-08T12:18:10+00:00</updated>
<author>
<name>Elizabeth Figura</name>
<email>zfigura@codeweavers.com</email>
</author>
<published>2024-12-13T19:34:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ecc2ee361466e4a22e95b1c27d90f8cbd4f22e93'/>
<id>urn:sha1:ecc2ee361466e4a22e95b1c27d90f8cbd4f22e93</id>
<content type='text'>
This does not correspond to any NT syscall. Rather, when a thread dies, it
should be called by the NT emulator for each mutex, with the TID of the dying
thread.

NT mutexes are robust (in the pthread sense). When an NT thread dies, any
mutexes it owned are immediately released. Acquisition of those mutexes by other
threads will return a special value indicating that the mutex was abandoned,
like EOWNERDEAD returned from pthread_mutex_lock(), and EOWNERDEAD is indeed
used here for that purpose.

Signed-off-by: Elizabeth Figura &lt;zfigura@codeweavers.com&gt;
Link: https://lore.kernel.org/r/20241213193511.457338-8-zfigura@codeweavers.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ntsync: Introduce NTSYNC_IOC_MUTEX_UNLOCK.</title>
<updated>2025-01-08T12:18:10+00:00</updated>
<author>
<name>Elizabeth Figura</name>
<email>zfigura@codeweavers.com</email>
</author>
<published>2024-12-13T19:34:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=31ca7bb8e8539b454414a2c4f8ad643c939cb0cf'/>
<id>urn:sha1:31ca7bb8e8539b454414a2c4f8ad643c939cb0cf</id>
<content type='text'>
This corresponds to the NT syscall NtReleaseMutant().

This syscall decrements the mutex's recursion count by one, and returns the
previous value. If the mutex is not owned by the current task, the function
instead fails and returns -EPERM.

Signed-off-by: Elizabeth Figura &lt;zfigura@codeweavers.com&gt;
Link: https://lore.kernel.org/r/20241213193511.457338-7-zfigura@codeweavers.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
