/[guile]/guile/guile-core/libguile/iselect.c
ViewVC logotype

Diff of /guile/guile-core/libguile/iselect.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.30 by ttn, Thu Mar 14 03:47:42 2002 UTC revision 1.31 by mvo, Sun Oct 27 20:13:10 2002 UTC
# Line 1  Line 1 
1  /*      Copyright (C) 1997, 1998, 2000, 2001 Free Software Foundation, Inc.  /*      Copyright (C) 1997, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
2   *   *
3   * This program is free software; you can redistribute it and/or modify   * This program is free software; you can redistribute it and/or modify
4   * it under the terms of the GNU General Public License as published by   * it under the terms of the GNU General Public License as published by
# Line 53  Line 53 
53    
54  #include "libguile/iselect.h"  #include "libguile/iselect.h"
55    
56  #ifdef GUILE_ISELECT  #ifdef USE_COOP_THREADS
57    
58  #include "libguile/coop-threads.h"  #include "libguile/coop-threads.h"
59    
# Line 623  scm_init_iselect () Line 623  scm_init_iselect ()
623  #include "libguile/iselect.x"  #include "libguile/iselect.x"
624  }  }
625    
 #endif /* GUILE_ISELECT */  
   
626  int  int
627  scm_internal_select (int nfds,  scm_internal_select (int nfds,
628                       SELECT_TYPE *readfds,                       SELECT_TYPE *readfds,
# Line 632  scm_internal_select (int nfds, Line 630  scm_internal_select (int nfds,
630                       SELECT_TYPE *exceptfds,                       SELECT_TYPE *exceptfds,
631                       struct timeval *timeout)                       struct timeval *timeout)
632  {  {
 #ifndef GUILE_ISELECT  
   int res = select (nfds, readfds, writefds, exceptfds, timeout);  
   SCM_ASYNC_TICK;  
   return res;  
 #else /* GUILE_ISELECT */  
633    struct timeval now;    struct timeval now;
634    coop_t *t, *curr = coop_global_curr;    coop_t *t, *curr = coop_global_curr;
635    
# Line 691  scm_internal_select (int nfds, Line 684  scm_internal_select (int nfds,
684    SCM_ALLOW_INTS;    SCM_ALLOW_INTS;
685    SCM_ASYNC_TICK;    SCM_ASYNC_TICK;
686    return coop_global_curr->retval;    return coop_global_curr->retval;
 #endif /* GUILE_ISELECT */  
687  }  }
688    
689    #else
690    #ifdef USE_NULL_THREADS
691    
692    int
693    scm_internal_select (int nfds,
694                         SELECT_TYPE *readfds,
695                         SELECT_TYPE *writefds,
696                         SELECT_TYPE *exceptfds,
697                         struct timeval *timeout)
698    {
699      int res = select (nfds, readfds, writefds, exceptfds, timeout);
700      SCM_ASYNC_TICK;
701      return res;
702    }
703    
704    void
705    scm_init_iselect ()
706    {
707    #include "libguile/iselect.x"
708    }
709    
710    #endif /* USE_NULL_THREADS */
711    #endif /* !USE_COOP_THREADS */
712    
713  /*  /*
714    Local Variables:    Local Variables:
715    c-file-style: "gnu"    c-file-style: "gnu"

Legend:
Removed from v.1.30  
changed lines
  Added in v.1.31

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26