1

I'm working on the program cvs-fast-export (http://www.catb.org/esr/cvs-fast-export/)

It is designed with multiple different phases of code, leading serially into each other.

One phase (analyze masters) benefits greatly from multi-threading. There is an option to compile the program with thread support to take advantage of this.

However, when using the option, the other, non-threaded phases suffer.

I know that when compiled with pthreads, a number of standard functions get replaced with thread safe versions. Is there a way to indicate in code that there are sections of code that don't need this?

Laurence
  • 10,896
  • 1
  • 25
  • 34
  • 2
    What functions do you believe are replaced with thread safe versions? Please edit your question to give references. – Basile Starynkevitch Nov 25 '14 at 20:34
  • @BasileStarynkevitch C lib for example: http://stackoverflow.com/a/6587269/4082723 @ Laurence Perhaps you could do it per file. – 2501 Nov 25 '14 at 20:38
  • I don't believe it is true today, at least on a recent Linux. `-D_REENTRANT` makes visible some *additional* functions (e.g. `getlogin_r`); I don't see any *replacement*. Read [feature_test_macros(7)](http://man7.org/linux/man-pages/man7/feature_test_macros.7.html) and look inside `/usr/include/` – Basile Starynkevitch Nov 25 '14 at 20:40
  • @2501 I'll try undefining and defining _RENTRANT. At least it compiles which is a good start. – Laurence Nov 25 '14 at 20:53
  • @BasileStarynkevitch I'm mostly working on cygwin, but I'll certainly look at those references, thank you. – Laurence Nov 25 '14 at 20:57

0 Answers0