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

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

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

revision 1.52 by hanwen, Fri Aug 16 22:01:09 2002 UTC revision 1.53 by mvo, Sun Oct 27 20:13:24 2002 UTC
# Line 1  Line 1 
1  /* Copyright (C) 1998,1999,2000,2001 Free Software Foundation, Inc.  /* Copyright (C) 1998,1999,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 1478  static scm_t_bits **hell; Line 1478  static scm_t_bits **hell;
1478  static long n_hell = 1;         /* one place for the evil one himself */  static long n_hell = 1;         /* one place for the evil one himself */
1479  static long hell_size = 4;  static long hell_size = 4;
1480  #ifdef USE_THREADS  #ifdef USE_THREADS
1481  static scm_t_mutex hell_mutex;  static SCM hell_mutex;
1482  #endif  #endif
1483    
1484  static long  static long
# Line 1496  go_to_hell (void *o) Line 1496  go_to_hell (void *o)
1496  {  {
1497    SCM obj = SCM_PACK ((scm_t_bits) o);    SCM obj = SCM_PACK ((scm_t_bits) o);
1498  #ifdef USE_THREADS  #ifdef USE_THREADS
1499    scm_mutex_lock (&hell_mutex);    scm_lock_mutex (hell_mutex);
1500  #endif  #endif
1501    if (n_hell == hell_size)    if (n_hell == hell_size)
1502      {      {
# Line 1506  go_to_hell (void *o) Line 1506  go_to_hell (void *o)
1506      }      }
1507    hell[n_hell++] = SCM_STRUCT_DATA (obj);    hell[n_hell++] = SCM_STRUCT_DATA (obj);
1508  #ifdef USE_THREADS  #ifdef USE_THREADS
1509    scm_mutex_unlock (&hell_mutex);    scm_unlock_mutex (hell_mutex);
1510  #endif  #endif
1511  }  }
1512    
# Line 1514  static void Line 1514  static void
1514  go_to_heaven (void *o)  go_to_heaven (void *o)
1515  {  {
1516  #ifdef USE_THREADS  #ifdef USE_THREADS
1517    scm_mutex_lock (&hell_mutex);    scm_lock_mutex (hell_mutex);
1518  #endif  #endif
1519    hell[burnin (SCM_PACK ((scm_t_bits) o))] = hell[--n_hell];    hell[burnin (SCM_PACK ((scm_t_bits) o))] = hell[--n_hell];
1520  #ifdef USE_THREADS  #ifdef USE_THREADS
1521    scm_mutex_unlock (&hell_mutex);    scm_unlock_mutex (hell_mutex);
1522  #endif  #endif
1523  }  }
1524    
# Line 2696  scm_init_goops_builtins (void) Line 2696  scm_init_goops_builtins (void)
2696    
2697    hell = scm_malloc (hell_size);    hell = scm_malloc (hell_size);
2698  #ifdef USE_THREADS  #ifdef USE_THREADS
2699    scm_mutex_init (&hell_mutex);    hell_mutex = scm_permanent_object (scm_make_mutex ());
2700  #endif  #endif
2701    
2702    create_basic_classes ();    create_basic_classes ();

Legend:
Removed from v.1.52  
changed lines
  Added in v.1.53

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