Skip to contentSkip to conversation

Use a union of sigval instead of sigval_t

PATCH New Khem Raj 3 participants 4 messages Jan 7, 2016 Library code

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH v2 1/1 Use a union of sigval instead of sigval_t

sigval_t is glibc only construct, we use a union of sigval which pretty much is same effect as sigval_t

---
 lib/tlibio.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
lib/tlibio.c +1 -4
index 6b6103f..7b6bb33 100644
@@ -130,9 +130,6 @@
 #endif
 
 static void lio_async_signal_handler();
-#ifdef sgi
-static void lio_async_callback_handler();
-#endif
 
 /*
  * Define the structure as used in lio_parse_arg1 and lio_help1
@@ -441,7 +438,7 @@ static void lio_async_signal_handler(int sig)
  * If the handler is called, it will increment the Received_callback
  * global variable.
  ***********************************************************************/
-static void lio_async_callback_handler(sigval_t sigval)
+static void lio_async_callback_handler(union sigval sigval)
 {
 	if (Debug_level)
 		printf
Signature · 1 line
2.7.0
#1 lore raw

PATCH v2 1/1 Use a union of sigval instead of sigval_t

----- Original Message -----

Quoted 9 lines

From: "Khem Raj" <[email protected]>
To: [email protected]
Sent: Thursday, 7 January, 2016 1:25:16 PM
Subject: [LTP] [PATCH V2] Use a union of sigval instead of sigval_t

sigval_t is glibc only construct, we use a union of sigval which pretty much is same effect as sigval_t

Looks good to me, I think this should be safe to apply before release. (I tested it across RHEL5.6/6.0/7.0)

Cyril, do you agree?

Regards,
Jan

Quoted 34 lines
---
 lib/tlibio.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
lib/tlibio.c +1 -5
index 6b6103f..7b6bb33 100644
@@ -130,9 +130,6 @@
 #endif
 
 static void lio_async_signal_handler();
-#ifdef sgi
-static void lio_async_callback_handler();
-#endif
 
 /*
  * Define the structure as used in lio_parse_arg1 and lio_help1
@@ -441,7 +438,7 @@ static void lio_async_signal_handler(int sig)
  * If the handler is called, it will increment the Received_callback
  * global variable.
  ***********************************************************************/
-static void lio_async_callback_handler(sigval_t sigval)
+static void lio_async_callback_handler(union sigval sigval)
 {
 	if (Debug_level)
 		printf
--

2.7.0

--
Mailing list info: http://lists.linux.it/listinfo/ltp

#2 lore raw

PATCH v2 1/1 Use a union of sigval instead of sigval_t

Hi!

Quoted 11 lines
Quoted 4 lines

sigval_t is glibc only construct, we use a union of sigval which pretty much is same effect as sigval_t

Looks good to me, I think this should be safe to apply before release. (I tested it across RHEL5.6/6.0/7.0)

Cyril, do you agree?

Looking into POSIX it explicitly says that the callback takes union sigval paramter and not sigval_t.
(http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/signal.h.html)

So this change should not break anything. Acked to go in before release by me as well.

Signature · 2 lines
Cyril Hrubis
[email protected]
#3 lore raw

PATCH v2 1/1 Use a union of sigval instead of sigval_t

----- Original Message -----

Quoted 17 lines

From: "Cyril Hrubis" <[email protected]>
To: "Jan Stancek" <[email protected]>
Cc: "Khem Raj" <[email protected]>, [email protected]
Sent: Thursday, 7 January, 2016 3:08:51 PM
Subject: Re: [LTP] [PATCH V2] Use a union of sigval instead of sigval_t

Hi!

Quoted 10 lines
Quoted 4 lines

sigval_t is glibc only construct, we use a union of sigval which pretty much is same effect as sigval_t

Looks good to me, I think this should be safe to apply before release. (I tested it across RHEL5.6/6.0/7.0)

Quoted 8 lines
Quoted 1 line

Cyril, do you agree?

Looking into POSIX it explicitly says that the callback takes union sigval paramter and not sigval_t.
(http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/signal.h.html)

So this change should not break anything. Acked to go in before release by me as well.

Pushed with 2nd fwd declaration removed too and added POSIX reference to commit message.

Regards,
Jan

Quoted 5 lines

--
Cyril Hrubis
[email protected]