All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] revl: Add empty Send + Sync implementations for Event
@ 2022-08-23 19:57 Jussi Viiri
  2022-08-24 10:12 ` Philippe Gerum
       [not found] ` <cacc03cf-7bf6-2e48-caf1-63bbdd40b2aa@iki.fi>
  0 siblings, 2 replies; 4+ messages in thread
From: Jussi Viiri @ 2022-08-23 19:57 UTC (permalink / raw)
  To: xenomai

Event wasn't safe to send across threads. Fixed.

---

 From 0782e7d6c5f9189fe85f8f340721e1bcec3d16b2 Mon Sep 17 00:00:00 2001
From: Jussi Viiri <ilmai@iki.fi>
Date: Tue, 23 Aug 2022 22:49:01 +0300
Subject: [PATCH 3/3] Add empty Send + Sync implementations for Event

---
  src/event.rs | 3 +++
  1 file changed, 3 insertions(+)

diff --git a/src/event.rs b/src/event.rs
index 7fdfd23..f469c43 100644
--- a/src/event.rs
+++ b/src/event.rs
@@ -76,6 +76,9 @@ impl WaitTimeoutResult {

  pub struct Event(UnsafeCell<evl_event>);

+unsafe impl Send for Event {}
+unsafe impl Sync for Event {}
+
  impl Event {
      pub fn new(builder: Builder) -> Result<Self, Error> {
          let this = Self(UnsafeCell::new(unsafe {
--
2.25.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] revl: Add empty Send + Sync implementations for Event
  2022-08-23 19:57 [PATCH] revl: Add empty Send + Sync implementations for Event Jussi Viiri
@ 2022-08-24 10:12 ` Philippe Gerum
       [not found] ` <cacc03cf-7bf6-2e48-caf1-63bbdd40b2aa@iki.fi>
  1 sibling, 0 replies; 4+ messages in thread
From: Philippe Gerum @ 2022-08-24 10:12 UTC (permalink / raw)
  To: Jussi Viiri; +Cc: xenomai


Jussi Viiri <ilmai@iki.fi> writes:

> Event wasn't safe to send across threads. Fixed.
>
> ---
>
> From 0782e7d6c5f9189fe85f8f340721e1bcec3d16b2 Mon Sep 17 00:00:00 2001
> From: Jussi Viiri <ilmai@iki.fi>
> Date: Tue, 23 Aug 2022 22:49:01 +0300
> Subject: [PATCH 3/3] Add empty Send + Sync implementations for Event
>
> ---
>  src/event.rs | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/src/event.rs b/src/event.rs
> index 7fdfd23..f469c43 100644
> --- a/src/event.rs
> +++ b/src/event.rs
> @@ -76,6 +76,9 @@ impl WaitTimeoutResult {
>
>  pub struct Event(UnsafeCell<evl_event>);
>
> +unsafe impl Send for Event {}
> +unsafe impl Sync for Event {}
> +
>  impl Event {
>      pub fn new(builder: Builder) -> Result<Self, Error> {
>          let this = Self(UnsafeCell::new(unsafe {

LGTM. We enforce the developer's certificate of origin as defined by the
linux kernel project, please send all patches with a Signed-off-by line
(resending this one as well).

Thanks,

-- 
Philippe.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] revl: Add empty Send + Sync implementations for Event
       [not found] ` <cacc03cf-7bf6-2e48-caf1-63bbdd40b2aa@iki.fi>
@ 2022-08-26  7:55   ` Jussi Viiri
  2022-08-26  8:21     ` Philippe Gerum
  0 siblings, 1 reply; 4+ messages in thread
From: Jussi Viiri @ 2022-08-26  7:55 UTC (permalink / raw)
  To: xenomai

Event wasn't safe to send across threads. Fixed.

Signed-off-by: Jussi Viiri <ilmai@iki.fi>

---

From 0782e7d6c5f9189fe85f8f340721e1bcec3d16b2 Mon Sep 17 00:00:00 2001
From: Jussi Viiri <ilmai@iki.fi>
Date: Tue, 23 Aug 2022 22:49:01 +0300
Subject: [PATCH 3/3] Add empty Send + Sync implementations for Event

---
  src/event.rs | 3 +++
  1 file changed, 3 insertions(+)

diff --git a/src/event.rs b/src/event.rs
index 7fdfd23..f469c43 100644
--- a/src/event.rs
+++ b/src/event.rs
@@ -76,6 +76,9 @@ impl WaitTimeoutResult {

  pub struct Event(UnsafeCell<evl_event>);

+unsafe impl Send for Event {}
+unsafe impl Sync for Event {}
+
  impl Event {
      pub fn new(builder: Builder) -> Result<Self, Error> {
          let this = Self(UnsafeCell::new(unsafe {
-- 
2.25.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] revl: Add empty Send + Sync implementations for Event
  2022-08-26  7:55   ` Jussi Viiri
@ 2022-08-26  8:21     ` Philippe Gerum
  0 siblings, 0 replies; 4+ messages in thread
From: Philippe Gerum @ 2022-08-26  8:21 UTC (permalink / raw)
  To: Jussi Viiri; +Cc: xenomai


Jussi Viiri <ilmai@iki.fi> writes:

> Event wasn't safe to send across threads. Fixed.
>
> Signed-off-by: Jussi Viiri <ilmai@iki.fi>
>
> ---
>
> From 0782e7d6c5f9189fe85f8f340721e1bcec3d16b2 Mon Sep 17 00:00:00 2001
> From: Jussi Viiri <ilmai@iki.fi>
> Date: Tue, 23 Aug 2022 22:49:01 +0300
> Subject: [PATCH 3/3] Add empty Send + Sync implementations for Event
>
> ---
>  src/event.rs | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/src/event.rs b/src/event.rs
> index 7fdfd23..f469c43 100644
> --- a/src/event.rs
> +++ b/src/event.rs
> @@ -76,6 +76,9 @@ impl WaitTimeoutResult {
>
>  pub struct Event(UnsafeCell<evl_event>);
>
> +unsafe impl Send for Event {}
> +unsafe impl Sync for Event {}
> +
>  impl Event {
>      pub fn new(builder: Builder) -> Result<Self, Error> {
>          let this = Self(UnsafeCell::new(unsafe {

Merged, thanks.

-- 
Philippe.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-08-26  8:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-23 19:57 [PATCH] revl: Add empty Send + Sync implementations for Event Jussi Viiri
2022-08-24 10:12 ` Philippe Gerum
     [not found] ` <cacc03cf-7bf6-2e48-caf1-63bbdd40b2aa@iki.fi>
2022-08-26  7:55   ` Jussi Viiri
2022-08-26  8:21     ` Philippe Gerum

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.