This is the mail archive of the guile@cygnus.com mailing list for the guile project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Hmm... i'm seriously confused about the use of SCM_{DEFER,ALLOW}_INTS. Since i couldn't find anything about them in the documentation i have here, i checked the guile sources, and found the following in unif.c: SCM scm_makflo (float x) { SCM z; if (x == 0.0) return scm_flo0; SCM_NEWCELL (z); SCM_DEFER_INTS; SCM_SETCAR (z, scm_tc_flo); SCM_FLO (z) = x; SCM_ALLOW_INTS; return z; } That is, it creates a new cell with interrupts enabled, and then disables the interrupts and assigns values to the cell. Why were the interrupts disabled only after the cell was created? And more important, where can i find more information about the *_INTS calls? Especially, what exactly they do and where one would need them. In a related context, is there anything special to note for guile-using C-code? I need to serialze access to functions of a library that's not thread-safe. Is it sufficient to use pthread mutex's here? -forcer -- ((email . "forcer@mindless.com") (www . "http://webserver.de/forcer/") (irc . "forcer@#StarWars (IRCnet)") (pgp . "key available on my website"))