* [PATCH 0/4] ntsync: some small fixes for doc and selftests
@ 2025-03-14 7:14 Su Hui
2025-03-14 7:14 ` [PATCH 4/4] docs: ntsync: update NTSYNC_IOC_* Su Hui
0 siblings, 1 reply; 3+ messages in thread
From: Su Hui @ 2025-03-14 7:14 UTC (permalink / raw)
To: zfigura, corbet, shuah
Cc: Su Hui, wine-devel, linux-doc, linux-kernel, linux-kselftest,
kernel-janitors
There are four small fixes for ntsync test and doc. I divided these into
four different patches due to different types of errors. If one patch is
better, I can do it too.
Su Hui (4):
selftests: ntsync: fix the wrong condition in wake_all
selftests: ntsync: avoid possible overflow in 32-bit machine
selftests: ntsync: update config
docs: ntsync: update NTSYNC_IOC_*
Documentation/userspace-api/ntsync.rst | 18 +++++++++---------
tools/testing/selftests/drivers/ntsync/config | 2 +-
.../testing/selftests/drivers/ntsync/ntsync.c | 6 +++---
3 files changed, 13 insertions(+), 13 deletions(-)
--
2.30.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 4/4] docs: ntsync: update NTSYNC_IOC_*
2025-03-14 7:14 [PATCH 0/4] ntsync: some small fixes for doc and selftests Su Hui
@ 2025-03-14 7:14 ` Su Hui
2025-03-14 22:12 ` Elizabeth Figura
0 siblings, 1 reply; 3+ messages in thread
From: Su Hui @ 2025-03-14 7:14 UTC (permalink / raw)
To: zfigura, corbet
Cc: Su Hui, wine-devel, linux-doc, linux-kernel, kernel-janitors
Some macros in the document do not match the code and the header files,
correct these macros according to the definitions in the code.
Signed-off-by: Su Hui <suhui@nfschina.com>
---
Documentation/userspace-api/ntsync.rst | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/Documentation/userspace-api/ntsync.rst b/Documentation/userspace-api/ntsync.rst
index 25e7c4aef968..969774bf4c60 100644
--- a/Documentation/userspace-api/ntsync.rst
+++ b/Documentation/userspace-api/ntsync.rst
@@ -152,9 +152,9 @@ The ioctls on the device file are as follows:
The ioctls on the individual objects are as follows:
-.. c:macro:: NTSYNC_IOC_SEM_POST
+.. c:macro:: NTSYNC_IOC_SEM_RELEASE
- Post to a semaphore object. Takes a pointer to a 32-bit integer,
+ Release a semaphore object. Takes a pointer to a 32-bit integer,
which on input holds the count to be added to the semaphore, and on
output contains its previous count.
@@ -186,7 +186,7 @@ The ioctls on the individual objects are as follows:
unowned and signaled, and eligible threads waiting on it will be
woken as appropriate.
-.. c:macro:: NTSYNC_IOC_SET_EVENT
+.. c:macro:: NTSYNC_IOC_EVENT_SET
Signal an event object. Takes a pointer to a 32-bit integer, which on
output contains the previous state of the event.
@@ -194,12 +194,12 @@ The ioctls on the individual objects are as follows:
Eligible threads will be woken, and auto-reset events will be
designaled appropriately.
-.. c:macro:: NTSYNC_IOC_RESET_EVENT
+.. c:macro:: NTSYNC_IOC_EVENT_RESET
Designal an event object. Takes a pointer to a 32-bit integer, which
on output contains the previous state of the event.
-.. c:macro:: NTSYNC_IOC_PULSE_EVENT
+.. c:macro:: NTSYNC_IOC_EVENT_PULSE
Wake threads waiting on an event object while leaving it in an
unsignaled state. Takes a pointer to a 32-bit integer, which on
@@ -213,7 +213,7 @@ The ioctls on the individual objects are as follows:
afterwards, and a simultaneous read operation will always report the
event as unsignaled.
-.. c:macro:: NTSYNC_IOC_READ_SEM
+.. c:macro:: NTSYNC_IOC_SEM_READ
Read the current state of a semaphore object. Takes a pointer to
struct :c:type:`ntsync_sem_args`, which is used as follows:
@@ -225,7 +225,7 @@ The ioctls on the individual objects are as follows:
* - ``max``
- On output, contains the maximum count of the semaphore.
-.. c:macro:: NTSYNC_IOC_READ_MUTEX
+.. c:macro:: NTSYNC_IOC_MUTEX_READ
Read the current state of a mutex object. Takes a pointer to struct
:c:type:`ntsync_mutex_args`, which is used as follows:
@@ -242,7 +242,7 @@ The ioctls on the individual objects are as follows:
``EOWNERDEAD``. In this case, ``count`` and ``owner`` are set to
zero.
-.. c:macro:: NTSYNC_IOC_READ_EVENT
+.. c:macro:: NTSYNC_IOC_EVENT_READ
Read the current state of an event object. Takes a pointer to struct
:c:type:`ntsync_event_args`, which is used as follows:
@@ -255,7 +255,7 @@ The ioctls on the individual objects are as follows:
- On output, contains 1 if the event is a manual-reset event,
and 0 otherwise.
-.. c:macro:: NTSYNC_IOC_KILL_OWNER
+.. c:macro:: NTSYNC_IOC_MUTEX_KILL
Mark a mutex as unowned and abandoned if it is owned by the given
owner. Takes an input-only pointer to a 32-bit integer denoting the
--
2.30.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 4/4] docs: ntsync: update NTSYNC_IOC_*
2025-03-14 7:14 ` [PATCH 4/4] docs: ntsync: update NTSYNC_IOC_* Su Hui
@ 2025-03-14 22:12 ` Elizabeth Figura
0 siblings, 0 replies; 3+ messages in thread
From: Elizabeth Figura @ 2025-03-14 22:12 UTC (permalink / raw)
To: corbet, Su Hui
Cc: Su Hui, wine-devel, linux-doc, linux-kernel, kernel-janitors
On Friday, 14 March 2025 02:14:54 CDT Su Hui wrote:
> Some macros in the document do not match the code and the header files,
> correct these macros according to the definitions in the code.
>
> Signed-off-by: Su Hui <suhui@nfschina.com>
> ---
> Documentation/userspace-api/ntsync.rst | 18 +++++++++---------
> 1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/Documentation/userspace-api/ntsync.rst b/Documentation/userspace-api/ntsync.rst
> index 25e7c4aef968..969774bf4c60 100644
> --- a/Documentation/userspace-api/ntsync.rst
> +++ b/Documentation/userspace-api/ntsync.rst
> @@ -152,9 +152,9 @@ The ioctls on the device file are as follows:
>
> The ioctls on the individual objects are as follows:
>
> -.. c:macro:: NTSYNC_IOC_SEM_POST
> +.. c:macro:: NTSYNC_IOC_SEM_RELEASE
>
> - Post to a semaphore object. Takes a pointer to a 32-bit integer,
> + Release a semaphore object. Takes a pointer to a 32-bit integer,
> which on input holds the count to be added to the semaphore, and on
> output contains its previous count.
>
> @@ -186,7 +186,7 @@ The ioctls on the individual objects are as follows:
> unowned and signaled, and eligible threads waiting on it will be
> woken as appropriate.
>
> -.. c:macro:: NTSYNC_IOC_SET_EVENT
> +.. c:macro:: NTSYNC_IOC_EVENT_SET
>
> Signal an event object. Takes a pointer to a 32-bit integer, which on
> output contains the previous state of the event.
> @@ -194,12 +194,12 @@ The ioctls on the individual objects are as follows:
> Eligible threads will be woken, and auto-reset events will be
> designaled appropriately.
>
> -.. c:macro:: NTSYNC_IOC_RESET_EVENT
> +.. c:macro:: NTSYNC_IOC_EVENT_RESET
>
> Designal an event object. Takes a pointer to a 32-bit integer, which
> on output contains the previous state of the event.
>
> -.. c:macro:: NTSYNC_IOC_PULSE_EVENT
> +.. c:macro:: NTSYNC_IOC_EVENT_PULSE
>
> Wake threads waiting on an event object while leaving it in an
> unsignaled state. Takes a pointer to a 32-bit integer, which on
> @@ -213,7 +213,7 @@ The ioctls on the individual objects are as follows:
> afterwards, and a simultaneous read operation will always report the
> event as unsignaled.
>
> -.. c:macro:: NTSYNC_IOC_READ_SEM
> +.. c:macro:: NTSYNC_IOC_SEM_READ
>
> Read the current state of a semaphore object. Takes a pointer to
> struct :c:type:`ntsync_sem_args`, which is used as follows:
> @@ -225,7 +225,7 @@ The ioctls on the individual objects are as follows:
> * - ``max``
> - On output, contains the maximum count of the semaphore.
>
> -.. c:macro:: NTSYNC_IOC_READ_MUTEX
> +.. c:macro:: NTSYNC_IOC_MUTEX_READ
>
> Read the current state of a mutex object. Takes a pointer to struct
> :c:type:`ntsync_mutex_args`, which is used as follows:
> @@ -242,7 +242,7 @@ The ioctls on the individual objects are as follows:
> ``EOWNERDEAD``. In this case, ``count`` and ``owner`` are set to
> zero.
>
> -.. c:macro:: NTSYNC_IOC_READ_EVENT
> +.. c:macro:: NTSYNC_IOC_EVENT_READ
>
> Read the current state of an event object. Takes a pointer to struct
> :c:type:`ntsync_event_args`, which is used as follows:
> @@ -255,7 +255,7 @@ The ioctls on the individual objects are as follows:
> - On output, contains 1 if the event is a manual-reset event,
> and 0 otherwise.
>
> -.. c:macro:: NTSYNC_IOC_KILL_OWNER
> +.. c:macro:: NTSYNC_IOC_MUTEX_KILL
>
> Mark a mutex as unowned and abandoned if it is owned by the given
> owner. Takes an input-only pointer to a 32-bit integer denoting the
>
Reviewed-by: Elizabeth Figura <zfigura@codeweavers.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-03-14 22:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-14 7:14 [PATCH 0/4] ntsync: some small fixes for doc and selftests Su Hui
2025-03-14 7:14 ` [PATCH 4/4] docs: ntsync: update NTSYNC_IOC_* Su Hui
2025-03-14 22:12 ` Elizabeth Figura
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox