Changeset fec3bde in git


Ignore:
Timestamp:
Mar 17, 2011, 1:41:54 PM (13 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
2815e8ac192a591e3d2618c320e12f21d3e7a2cd
Parents:
fbb23ba606a10b85b9967f56b46d70c6ed807282
Message:
check for pselect and alternative to pselect

git-svn-id: file:///usr/local/Singular/svn/trunk@14006 2c84dea3-7e68-4137-9b89-c4e89433aadc
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • Singular/configure

    rfbb23b rfec3bde  
    40224022fi
    40234023for ac_func in gettimeofday atexit bcopy getcwd getwd vsnprintf readlink \
    4024  sleep usleep getpwnam popen setenv siginterrupt sysconf
     4024 sleep usleep getpwnam popen setenv siginterrupt sysconf pselect
    40254025do
    40264026echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  • Singular/configure.in

    rfbb23b rfec3bde  
    826826AC_SEARCH_LIBS(setenv, bsd)
    827827AC_CHECK_FUNCS(gettimeofday atexit bcopy getcwd getwd vsnprintf readlink \
    828  sleep usleep getpwnam popen setenv siginterrupt sysconf)
     828 sleep usleep getpwnam popen setenv siginterrupt sysconf pselect)
    829829
    830830
  • Singular/mod2.h.in

    rfbb23b rfec3bde  
    108108/* Define if you have siginterrupt (BSD4.3) */
    109109#undef HAVE_SIGINTERRUPT
     110/* Define if you have pselect */
     111#undef HAVE_PSELECT
    110112/* define for boost includes and lib */
    111113//////////////////////// #undef HAVE_BOOST_DYNAMIC_BITSET_HPP
  • Singular/ssiLink.cc

    rfbb23b rfec3bde  
    12201220
    12211221  /* timeout */
     1222  #ifdef HAVE_PSELECT
    12221223  struct timespec wt;
     1224  struct timespec *wt_ptr=&wt;
     1225  #else
     1226  struct timeval wt;
     1227  struct timeval *wt_ptr=&wt;
     1228  #endif
    12231229  int startingtime = getRTimer()/TIMER_RESOLUTION;  // in seconds
    1224   struct timespec *wt_ptr=&wt;
    12251230  if (timeout== -1)
    12261231  {
     
    12301235  {
    12311236    wt.tv_sec  = timeout / 1000000;
     1237  #ifdef HAVE_PSELECT
    12321238    wt.tv_nsec = 1000 * (timeout % 1000000);
     1239  #else
     1240    wt.tv_usec = timeout % 1000000;
     1241  #endif
    12331242  }
    12341243
     
    13041313
    13051314  /* check with select: chars waiting: no -> not ready */
     1315  #ifdef HAVE_PSELECT
    13061316  s = pselect(max_fd, &mask, NULL, NULL, wt_ptr, &sigmask);
     1317  #else
     1318   sigset_t origsigmask;
     1319
     1320   sigprocmask(SIG_SETMASK, &sigmask, &origsigmask);
     1321   s = select(max_fd, &mask, NULL, NULL, wt_ptr);
     1322   sigprocmask(SIG_SETMASK, &origsigmask, NULL);
     1323   #endif
     1324
    13071325  if (s==-1)
    13081326  {
     
    13741392               timeout - 1000000*(getRTimer()/TIMER_RESOLUTION - startingtime));
    13751393          wt.tv_sec  = timeout / 1000000;
     1394          #ifdef HAVE_PSELECT
    13761395          wt.tv_nsec = 1000 * (timeout % 1000000);
     1396          #else
     1397          wt.tv_usec = (timeout % 1000000);
     1398          #endif
    13771399        }
    13781400        goto do_select;
  • kernel/mod2.h.in

    rfbb23b rfec3bde  
    108108/* Define if you have siginterrupt (BSD4.3) */
    109109#undef HAVE_SIGINTERRUPT
     110/* Define if you have pselect */
     111#undef HAVE_PSELECT
    110112/* define for boost includes and lib */
    111113//////////////////////// #undef HAVE_BOOST_DYNAMIC_BITSET_HPP
     
    160162/* CPU type: x86_64: */
    161163#undef SI_CPU_X86_64
     164/* whether development version of python is available */
     165#undef HAVE_PYTHON
     166/* whether static development version of python is available */
     167#undef HAVE_STATIC_PYTHON
     168/* whether python should be embedded */
     169#undef EMBED_PYTHON
    162170
    163171/*******************************************************************
     
    611619#endif
    612620
     621#define STRINGIFY(name) #name
     622#define EXPANDED_STRINGIFY(name) STRINGIFY(name)
     623
    613624#endif /* MOD2_H  */
Note: See TracChangeset for help on using the changeset viewer.