help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-glpk] Re: re-entrant test version of GLPK


From: Joonas Timo Taavetti Kekoni
Subject: [Help-glpk] Re: re-entrant test version of GLPK
Date: Thu, 2 Oct 2003 09:27:44 +0300 (EEST)

> To make glpk reentrant you only need to replace two low-level routines
> lib_set_ptr and lib_get_ptr in the file glplib1.c.

Hmmm... I see. I knew there was a catch. It felt too easy.

So this env pointer thing is used to attach hooks for
the print rutines and to keep tract of files and memory.

 This is IMHO stuff that are nice to have, but nothing that
 one could not live without if needed.

IMHO this should be part of the LPX object, but
it would probably require hevy refactoration of the code.

Allocation from thread_local if -DPTHREADS or
-DWIN32THREDS is specified would be ok too.

---

I do not think that is the only thing needed. If you look at the
files i pointed out they are using static global variables
to pass info between functions and that is not re-entrant.

The MPS and cplex LP file functions do it too.

>There is the
> "pointer" there, which must be stored separately for each thread in
> so-called thread local storage (currently it is simply stored in a
> static location called "secret place"). Then the entire glpk (except
> some routines which still use static data) will be reentrant.
>
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]