<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libgit2.git/src/git/thread-utils.h, branch ethomson/https_proxy</title>
<subtitle>github.com: libgit2/libgit2.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/'/>
<entry>
<title>Change the library include file</title>
<updated>2010-12-06T21:03:16+00:00</updated>
<author>
<name>Vicent Marti</name>
<email>tanoku@gmail.com</email>
</author>
<published>2010-12-06T21:03:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=44908fe763b1a2097b65c86130ac679c458df7d2'/>
<id>44908fe763b1a2097b65c86130ac679c458df7d2</id>
<content type='text'>
Libgit2 is now officially include as

	#include "&lt;git2.h&gt;"

or indidividual files may be included as

	#include &lt;git2/index.h&gt;

Signed-off-by: Vicent Marti &lt;tanoku@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Libgit2 is now officially include as

	#include "&lt;git2.h&gt;"

or indidividual files may be included as

	#include &lt;git2/index.h&gt;

Signed-off-by: Vicent Marti &lt;tanoku@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Cleanup our header inclusion order to ensure pthread.h is early</title>
<updated>2008-12-31T21:16:31+00:00</updated>
<author>
<name>Shawn O. Pearce</name>
<email>spearce@spearce.org</email>
</author>
<published>2008-12-31T21:16:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=d44cfd460e2c52d67dea14838b03219967cf9cb9'/>
<id>d44cfd460e2c52d67dea14838b03219967cf9cb9</id>
<content type='text'>
If we are using threads we need to make sure pthread.h comes
in before just about anything else.  Some platforms enable
macros that alter what other headers define.

Signed-off-by: Shawn O. Pearce &lt;spearce@spearce.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If we are using threads we need to make sure pthread.h comes
in before just about anything else.  Some platforms enable
macros that alter what other headers define.

Signed-off-by: Shawn O. Pearce &lt;spearce@spearce.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Support building on Mac OS X by using pthread_getspecific for TLS</title>
<updated>2008-12-31T05:56:11+00:00</updated>
<author>
<name>Shawn O. Pearce</name>
<email>spearce@spearce.org</email>
</author>
<published>2008-12-31T05:49:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=a1d34bc000cee6d72c3b5e329faa58424641611f'/>
<id>a1d34bc000cee6d72c3b5e329faa58424641611f</id>
<content type='text'>
The Mach-O format does not permit gcc to implement the __thread
TLS specification, so we must instead emulate it using a single
int cell allocated from memory and stored inside of the thread
specific data associated with the current pthread.

What makes this tricky is git_errno must be a valid lvalue, so
we really need to return a pointer to the caller and deference it
as part of the git_errno macro.

The GCC-specific __attribute__((constructor)) extension is used
to ensure the pthread_key_t is allocated before any Git functions
are executed in the library, as this is necessary to access our
thread specific storage.

Signed-off-by: Shawn O. Pearce &lt;spearce@spearce.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The Mach-O format does not permit gcc to implement the __thread
TLS specification, so we must instead emulate it using a single
int cell allocated from memory and stored inside of the thread
specific data associated with the current pthread.

What makes this tricky is git_errno must be a valid lvalue, so
we really need to return a pointer to the caller and deference it
as part of the git_errno macro.

The GCC-specific __attribute__((constructor)) extension is used
to ensure the pthread_key_t is allocated before any Git functions
are executed in the library, as this is necessary to access our
thread specific storage.

Signed-off-by: Shawn O. Pearce &lt;spearce@spearce.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Cleanup formatting in our head files to be more consistent</title>
<updated>2008-12-31T05:52:07+00:00</updated>
<author>
<name>Shawn O. Pearce</name>
<email>spearce@spearce.org</email>
</author>
<published>2008-12-31T05:25:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=b3039beea6d0637e131b24e8b6d61005cc1f6515'/>
<id>b3039beea6d0637e131b24e8b6d61005cc1f6515</id>
<content type='text'>
Signed-off-by: Shawn O. Pearce &lt;spearce@spearce.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Shawn O. Pearce &lt;spearce@spearce.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Diasble TLS on cygwin</title>
<updated>2008-12-02T17:23:48+00:00</updated>
<author>
<name>Ramsay Jones</name>
<email>ramsay@ramsay1.demon.co.uk</email>
</author>
<published>2008-11-29T19:21:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=b72ca26740c71371258bd178188a3d981e39701e'/>
<id>b72ca26740c71371258bd178188a3d981e39701e</id>
<content type='text'>
Signed-off-by: Ramsay Jones &lt;ramsay@ramsay1.demon.co.uk&gt;
Acked-by: Andreas Ericsson &lt;ae@op5.se&gt;
Signed-off-by: Shawn O. Pearce &lt;spearce@spearce.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Ramsay Jones &lt;ramsay@ramsay1.demon.co.uk&gt;
Acked-by: Andreas Ericsson &lt;ae@op5.se&gt;
Signed-off-by: Shawn O. Pearce &lt;spearce@spearce.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Use __CHECKER__ to detect when sparse is running</title>
<updated>2008-12-02T17:23:18+00:00</updated>
<author>
<name>Ramsay Jones</name>
<email>ramsay@ramsay1.demon.co.uk</email>
</author>
<published>2008-11-29T19:20:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=1764376034ce4f4c899f141c121e1be9167d1e83'/>
<id>1764376034ce4f4c899f141c121e1be9167d1e83</id>
<content type='text'>
Signed-off-by: Ramsay Jones &lt;ramsay@ramsay1.demon.co.uk&gt;
Acked-by: Andreas Ericsson &lt;ae@op5.se&gt;
Signed-off-by: Shawn O. Pearce &lt;spearce@spearce.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Ramsay Jones &lt;ramsay@ramsay1.demon.co.uk&gt;
Acked-by: Andreas Ericsson &lt;ae@op5.se&gt;
Signed-off-by: Shawn O. Pearce &lt;spearce@spearce.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add an embryo of a TLS-aware error handling system</title>
<updated>2008-11-22T20:08:00+00:00</updated>
<author>
<name>Andreas Ericsson</name>
<email>ae@op5.se</email>
</author>
<published>2008-11-18T21:20:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=ae23486285f4e16896afd53b20dd11180d26381a'/>
<id>ae23486285f4e16896afd53b20dd11180d26381a</id>
<content type='text'>
This adds the per-thread global variable git_errno to the
system, which callers can examine to get information about
an error.

Two helper functions are added to reduce LoC-count for the
library code itself.

Also, some exceptions are made for running sparse on GIT_TLS
definitions, since it doesn't grok thread-local variables at
all.

Signed-off-by: Andreas Ericsson &lt;ae@op5.se&gt;
Signed-off-by: Shawn O. Pearce &lt;spearce@spearce.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This adds the per-thread global variable git_errno to the
system, which callers can examine to get information about
an error.

Two helper functions are added to reduce LoC-count for the
library code itself.

Also, some exceptions are made for running sparse on GIT_TLS
definitions, since it doesn't grok thread-local variables at
all.

Signed-off-by: Andreas Ericsson &lt;ae@op5.se&gt;
Signed-off-by: Shawn O. Pearce &lt;spearce@spearce.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add compiler/platform agnostic thread-local storage</title>
<updated>2008-11-18T18:32:53+00:00</updated>
<author>
<name>Andreas Ericsson</name>
<email>ae@op5.se</email>
</author>
<published>2008-11-18T18:06:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=36f0f61fc8578478a9dc9b33a1a0d07cdb98a5e5'/>
<id>36f0f61fc8578478a9dc9b33a1a0d07cdb98a5e5</id>
<content type='text'>
It doesn't cover all cases, but we can work on those as
we go along. For now, gcc, MSVC++, Intel C/C++, IBM XL C/C++,
Sun Studio C/C++ and Borland C++ Builder are the supported
compilers (although we boldly assume that they all are of
a recent enough version to support thread-local storage).

This is intended to be used in upcoming patches that implement
graceful (but TLS-dependant) error-handling in the library.

As an added bonus, we also bring the online_cpus() function
from git.git to detect the number of usable cpu's.

Signed-off-by: Andreas Ericsson &lt;ae@op5.se&gt;
Signed-off-by: Shawn O. Pearce &lt;spearce@spearce.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It doesn't cover all cases, but we can work on those as
we go along. For now, gcc, MSVC++, Intel C/C++, IBM XL C/C++,
Sun Studio C/C++ and Borland C++ Builder are the supported
compilers (although we boldly assume that they all are of
a recent enough version to support thread-local storage).

This is intended to be used in upcoming patches that implement
graceful (but TLS-dependant) error-handling in the library.

As an added bonus, we also bring the online_cpus() function
from git.git to detect the number of usable cpu's.

Signed-off-by: Andreas Ericsson &lt;ae@op5.se&gt;
Signed-off-by: Shawn O. Pearce &lt;spearce@spearce.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
