Is there a bug in c/src/aclocal/check-smp.m4 ?

Tom Smith venture.g at gmail.com
Thu May 22 22:08:46 UTC 2014


AC_CACHE_CHECK([whether CPU supports SMP],
  rtems_cv_HAS_POSIX_API,
  [dnl
    case "$RTEMS_CPU" in
    *)
      if test "${RTEMS_HAS_SMP}" = "yes"; then
        rtems_cv_HAS_SMP="yes";
      else
        rtems_cv_HAS_SMP="disabled";
      fi
      ;;
    esac])


should rtems_cv_HAS_POSIX_API  be  rtems_cv_HAS_SMP  ?



2014-05-23 1:00 GMT+08:00 <rtems-users-request at rtems.org>:

> Send rtems-users mailing list submissions to
>         rtems-users at rtems.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         http://www.rtems.org/mailman/listinfo/rtems-users
> or, via email, send a message with subject or body 'help' to
>         rtems-users-request at rtems.org
>
> You can reach the person managing the list at
>         rtems-users-owner at rtems.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of rtems-users digest..."
>
>
> Today's Topics:
>
>    1. Is there a bug using select() ? (Thomas Kim)
>    2. Re: Is there a bug using select() ? (Sebastian Huber)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 22 May 2014 18:09:27 +0900
> From: Thomas Kim <thomas73.kim at gmail.com>
> To: "rtems-users at rtems.org" <rtems-users at rtems.org>
> Subject: Is there a bug using select() ?
> Message-ID:
>         <
> CADY8aTDk89AvKHsOwx0cWhxZ6mnSS0JH1AVJE-1pgfNQrXTvig at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Dear Sir,
>
> I am tring to integrate POSIX application on RTEMS.
> our POSIX application use select() for I/O multiplexing mechanism.
> At this time, select() always return "-1" value, it mean "bad file number".
>
> Therefore, I tested simple test code using select() function in below;
> Is it a bug using select() ? and, Is there how to do fix this problem ?
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> void test_select(void)
> {
>     int fd[2];
>     int i;
>     int n;
>     int state;
>
>     char buf[255];
>
>     struct timeval tv;
>
>     fd_set readfds, writefds;
>
> mkdir ("tmp", S_IRWXU|S_IRWXG|S_IRWXO);
>
>     if ((fd[0] = open("/tmp/testfile", O_CREAT | O_RDONLY)) == -1)
>     {
>         printf("file open error : ");
>         exit(0);
>     }
>     if ((fd[1] = open("/tmp/testfile2", O_CREAT | O_RDONLY)) == -1)
>     {
>         printf("file open error : ");
>         exit(0);
>     }
>
>     memset (buf, 0x00, 255);
>
>     for(;;)
>     {
>         FD_ZERO(&readfds);
>         FD_SET(fd[0], &readfds);
>         FD_SET(fd[1], &readfds);
>
>         state = select(fd[1]+1, &readfds, NULL, NULL, NULL);
>         switch(state)
>         {
>             case -1:
>                 perror("select error : ");
>                 exit(0);
>                 break;
>
>             default :
>                 for (i = 0; i < 2; i++)
>                 {
>                     if (FD_ISSET(fd[i], &readfds))
>                     {
>                         while ((n = read(fd[i], buf, 255)) > 0)
>                             printf("(%d) [%d] %s", state, i, buf);
>                     }
>                 }
>                 memset (buf, 0x00, 255);
>                 break;
>         }
>         usleep(1000);
>     }
> }
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Best Regards.
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://www.rtems.org/pipermail/rtems-users/attachments/20140522/f60445da/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 2
> Date: Thu, 22 May 2014 11:24:09 +0200
> From: Sebastian Huber <sebastian.huber at embedded-brains.de>
> To: rtems-users at rtems.org
> Subject: Re: Is there a bug using select() ?
> Message-ID: <537DC239.6090702 at embedded-brains.de>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> On 2014-05-22 11:09, Thomas Kim wrote:
> > I am tring to integrate POSIX application on RTEMS.
> > our POSIX application use select() for I/O multiplexing mechanism.
> > At this time, select() always return "-1" value, it mean "bad file
> number".
> >
> > Therefore, I tested simple test code using select() function in below;
> > Is it a bug using select() ? and, Is there how to do fix this problem ?
> >
>
> The select() function works only with sockets on RTEMS.  With the new
> network
> stack it is also possible to use select() for normal files:
>
> http://git.rtems.org/rtems-libbsd/
>
> The new network stack supports also kqueue().
>
> --
> Sebastian Huber, embedded brains GmbH
>
> Address : Dornierstr. 4, D-82178 Puchheim, Germany
> Phone   : +49 89 189 47 41-16
> Fax     : +49 89 189 47 41-09
> E-Mail  : sebastian.huber at embedded-brains.de
> PGP     : Public key available on request.
>
> Diese Nachricht ist keine gesch?ftliche Mitteilung im Sinne des EHUG.
>
>
> ------------------------------
>
> _______________________________________________
> rtems-users mailing list
> rtems-users at rtems.org
> http://www.rtems.org/mailman/listinfo/rtems-users
>
>
> End of rtems-users Digest, Vol 92, Issue 18
> *******************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20140523/6c06e125/attachment.html>


More information about the users mailing list