httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dean gaudet <>
Subject Re: Apache-1.3: question about mod_unique_id
Date Thu, 13 Sep 2001 16:45:58 GMT
On Wed, 12 Sep 2001, G√ľnter Knauf wrote:

> For NetWare I found this definition in ./netware/os.h:
> #define getpid GetThreadID
> and in the NetWare header nwthread.h GetThreadID() is defined as:
> int   GetThreadID( void );
> for Win32 platform getpid() is defined in process.h:
> _CRTIMP int __cdecl _getpid(void);
> #define getpid	 _getpid
> I didnt find more information about these functions yet nor of other functions which
I could use to concatenate with.
> Do you think that they are insufficient for use with mod_unique_id?
> On NetWare I assume that the ThreadID is always unique on the same machine, on Win32
I dont know.
> The patch to get mod_unique_id compiled is only the #error ifdef:
> - #ifdef MULTITHREAD
> + #if defined(MULTITHREAD) && !(defined(NETWARE) || defined(WIN32))

if the netware thread id is truly globally unique then you can use it

but on windows you'll need to use both getpid() and GetThreadID... i think
it's called something similar to that.  it may be "Get Thread Handle" ...
what you really want is the thread * that create_thread returns, or you
could use the scoreboard slot, but i don't see an obvious way to get at
either.  also -- add an extra field to unique_id_rec for the thread id.


View raw message