Skip to content

Make some functions thread-safe

Fredrik Kuivinen git 1 version New

Get series with b4
b4 am 20100323173101.GA4218@fredrik-laptop

Versions newest first

  1. v1 Latest0 of 2 patches 0 repliesNew

Patches in v1 No applies recorded yet

None of the 2 patches the cover letter announces are in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

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

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(-)