git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 0/2] Make some functions thread-safe

From
Fredrik Kuivinen <frekui@gmail.com>
Date
Mar 23, 2010, 17:31 UTC
Message-ID
<20100323173101.GA4218@fredrik-laptop>

Here are two patches which makes xmalloc, xrealloc and sha1_to_hex thread-safe.

I think the xmalloc/xrealloc patch is a clear improvement compared to the current situation.

The sha1_to_hex patch is a bit complicated and is more of an RFC. It makes use of pthread_once which is not (yet) implemented in our pthreads win32 compatibility layer.

---
Fredrik Kuivinen (2):
      Make sha1_to_hex thread-safe
      Make xmalloc and xrealloc thread-safe
 builtin/grep.c         |    2 +-
 builtin/pack-objects.c |    4 ++--
 git-compat-util.h      |    8 +++++++
 hex.c                  |   53 ++++++++++++++++++++++++++++++++++++++++++++++++
 preload-index.c        |    2 +-
 run-command.c          |    3 ++-
 wrapper.c              |   22 ++++++++++++++------
 7 files changed, 83 insertions(+), 11 deletions(-)
Message 1 of 1 in “Make some functions thread-safe”
  1. 0/2 Make some functions thread-safeFredrik Kuivinen, Mar 23, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.