* Fix pthread_kill return value
@ 2010-02-08 22:19 Jay Foster
0 siblings, 0 replies; only message in thread
From: Jay Foster @ 2010-02-08 22:19 UTC (permalink / raw)
To: eCos Patches
[-- Attachment #1: Type: text/plain, Size: 91 bytes --]
Attached patch correct the pthread_kill() return value to match the
POSIX standard.
Jay
[-- Attachment #2: pthread_kill.pat --]
[-- Type: text/plain, Size: 3602 bytes --]
Index: ecos/packages/compat/posix/current/ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/compat/posix/current/ChangeLog,v
retrieving revision 1.56
diff -u -5 -p -r1.56 ChangeLog
--- ecos/packages/compat/posix/current/ChangeLog 25 Mar 2009 08:03:56 -0000 1.56
+++ ecos/packages/compat/posix/current/ChangeLog 8 Feb 2010 22:16:58 -0000
@@ -1,5 +1,10 @@
+2010-02-08 Jay Foster <jay@systech.com>
+
+ * src/signal.cxx (pthread_kill): Corrected return value for
+ pthread_kill() to match POSIX standard.
+
2009-03-25 John Dallaway <john@dallaway.org.uk>
* src/signal.cxx (pause): Revert change of 2006-07-18 pending
updating of the signal1, signal3 and timer1 tests.
[ Bugzilla 1000689, 1000690 ]
Index: ecos/packages/compat/posix/current/src/signal.cxx
===================================================================
RCS file: /cvs/ecos/ecos/packages/compat/posix/current/src/signal.cxx,v
retrieving revision 1.21
diff -u -5 -p -r1.21 signal.cxx
--- ecos/packages/compat/posix/current/src/signal.cxx 25 Mar 2009 08:03:56 -0000 1.21
+++ ecos/packages/compat/posix/current/src/signal.cxx 8 Feb 2010 22:16:59 -0000
@@ -552,28 +552,28 @@ externC int kill (pid_t pid, int sig)
externC int pthread_kill (pthread_t threadid, int sig)
{
SIGNAL_ENTRY();
if( !SIGNAL_VALID(sig) )
- SIGNAL_RETURN(EINVAL);
+ SIGNAL_RETURN_VALUE(EINVAL);
struct sigevent sev;
pthread_info *thread = pthread_info_id(threadid);
if( thread == NULL )
- SIGNAL_RETURN(ESRCH);
+ SIGNAL_RETURN_VALUE(ESRCH);
sev.sigev_notify = SIGEV_SIGNAL;
sev.sigev_signo = sig;
sev.sigev_value.sival_int = 0;
cyg_sigqueue( &sev, SI_USER, thread );
cyg_deliver_signals();
- SIGNAL_RETURN(0);
+ SIGNAL_RETURN_VALUE(0);
}
//==========================================================================
// Functions to catch signals
Index: ecos/packages/io/fileio/current/ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/io/fileio/current/ChangeLog,v
retrieving revision 1.70
diff -u -5 -p -r1.70 ChangeLog
--- ecos/packages/io/fileio/current/ChangeLog 2 Mar 2009 20:54:10 -0000 1.70
+++ ecos/packages/io/fileio/current/ChangeLog 8 Feb 2010 22:17:00 -0000
@@ -1,5 +1,10 @@
+2010-02-08 Jay Foster <jay@systech.com>
+
+ * tests/pselect.c: Corrected return value of pthread_kill()
+ to match POSIX standard.
+
2008-11-18 Rutger Hofman <rutger@cs.vu.nl>
* src/file.cxx: add a chmod() call, implemented by calling
cyg_fs_setinfo with parameter FS_INFO_CHMOD
Index: ecos/packages/io/fileio/current/tests/pselect.c
===================================================================
RCS file: /cvs/ecos/ecos/packages/io/fileio/current/tests/pselect.c,v
retrieving revision 1.5
diff -u -5 -p -r1.5 pselect.c
--- ecos/packages/io/fileio/current/tests/pselect.c 29 Jan 2009 17:49:46 -0000 1.5
+++ ecos/packages/io/fileio/current/tests/pselect.c 8 Feb 2010 22:17:00 -0000
@@ -271,11 +271,12 @@ void *pthread_entry2( void *arg)
while( sigusr1_sent < NUM_TEST_SIGNALS )
{
nanosleep( &zzz, NULL );
err = pthread_kill( thread1, SIGUSR1 );
- if( err < 0 ) SHOW_RESULT( pthread_kill, err );
+ if( err != 0 )
+ diag_printf("INFO: pthread_kill() returned %d %s\n", err, strerror(err));
sigusr1_sent++;
if( (sigusr1_sent % 500) == 0 )
diag_printf("INFO: <Thread 2: %d signals sent>\n",sigusr1_sent);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-02-08 22:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-08 22:19 Fix pthread_kill return value Jay Foster
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).