dazuko-help
[Top][All Lists]
Advanced

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

Re: [Dazuko-help] dazuko and threads


From: John Ogness
Subject: Re: [Dazuko-help] dazuko and threads
Date: Sun, 20 Jul 2003 10:27:07 +0200
User-agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4) Gecko/20030708

Hi,

Thank you for bringing this to my attention. A new pre-release is available:

http://savannah.gnu.org/download/dazuko/dazuko-1.2.2-pre2.tar.gz

This version includes support for threads. However, the functions are not thread-safe, so you should add your own locks around the dazukoXXX function calls.

John Ogness


Frantisek Mensik wrote:
Hi,

cause:
dazkoio.c file, lines 40 and 41.
_DAZUKO_DEVICE is set to value 7 after first call of dazukoRegister function from the first thread. So call of the same function ends with 'return -1;' in the second thread.

- Frantisek Mensik


John Ogness wrote:

Hi,

What kinds of errors were you getting? Dazuko identifies registered
processes by PID. Since each thread in Linux has its own PID, it must
register separately. Threads of a registered process will not be
recognized as registered.

If you compile Dazuko using with the -DDEBUG flag, then Dazuko will
output more information about what is going on. It might help to make
things clearer.

John Ogness


Frantisek Mensik wrote:

Hi,
I've tryed it in a test application and I couldn't register in second
and third threads. Wouldn't it be better to register only once in a main
thread, than create threads (pthread_create) which would get access from
included files.

-Frantisek Mensik


John Ogness wrote:


Hi,

Yes, each thread may register with Dazuko. However, each thread is then
also responsible for handling file access control.

John Ogness


Frantisek Mensik wrote:


Hi,
if I have an application with more threads, is it possible to register
dazuko from each thread?
Thanks for an answer,
-F.M.





reply via email to

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