public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] select() and signal's
@ 2001-04-20  5:42 Boris V. Guzhov
  2001-04-20  6:57 ` Jonathan Larmour
  0 siblings, 1 reply; 7+ messages in thread
From: Boris V. Guzhov @ 2001-04-20  5:42 UTC (permalink / raw)
  To: ecos-discuss

Hi,

Are there any way in eCos to interrupt the select() blocking
through a sending of a any signal?

For instance:

// posix thread 1:
void *thr1(void *par)
{
  struct sigaction sa;
  sigset_t mask;

  sigemptyset( &mask );
  sigaddset( &mask, SIGRTMIN );
  pthread_sigmask( SIG_UNBLOCK, &mask, 0 );

  sigemptyset( &sa.sa_mask );
  sa.sa_flags = SA_SIGINFO;
  sa.sa_sigaction = my_sig_handler;
  sigaction( SIGTRTMIN, &sa, NULL);

  fd_set rfds;
  int retval;

  FD_ZERO(&rfds);
  FD_SET(0, &rfds);
  retval = select(1, &rfds, NULL, NULL, NULL);
  if ( retval < 0 )
    perror("select:");
 ...
}

// posix thread 2:
void *thr2(void *par)
{
...
  pthread_kill( th1, SIGRTMIN) ;
...
}


In Linux it works, but in eCos it not works.

How can I  do it in eCos?


Thanks in advance.

--
Boris Guzhov,
St.Petersburg, Russia



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

end of thread, other threads:[~2001-04-23 12:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-20  5:42 [ECOS] select() and signal's Boris V. Guzhov
2001-04-20  6:57 ` Jonathan Larmour
2001-04-20  8:13   ` Boris V. Guzhov
2001-04-20 13:11     ` Jonathan Larmour
2001-04-21  5:52       ` Boris V. Guzhov
2001-04-21  6:02       ` Boris V. Guzhov
2001-04-23 12:32         ` Jonathan Larmour

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).