DragonFly BSD
DragonFly kernel List (threaded) for 2005-03
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: What is __thread tls?


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Mon, 14 Mar 2005 12:03:49 -0800 (PST)

:
:On Mon, 14 Mar 2005, Matthew Dillon wrote:
:[cut]
:>     This feature could be used by, well, just about every library.  For example,
:>     it would allow us to clean up how 'errno' works in a threaded environment.
:>     It would allow standard libc calls such as ctime() and localtime() work
:>     properly in a threaded environment, and it would greatly simplify the job
:>     of writing threaded library code.
:
:I was under the impression that each pthread has its own errno???  Perhaps
:I am not understanding the context.  I'm writing my first threaded
:application so I had best get this straight sooner rather than later.
:
:-Zera

    yup, you are right... see if you can figure out how errno is defined
    for a threaded program in the current environment.  Hint: it isn't a 
    simple global declaration.

					-Matt
					Matthew Dillon 
					<dillon@xxxxxxxxxxxxx>



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