All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] Pass t5530 on Windows
@ 2010-03-06 15:40 Johannes Sixt
  2010-03-06 20:12 ` Junio C Hamano
  0 siblings, 1 reply; 16+ messages in thread
From: Johannes Sixt @ 2010-03-06 15:40 UTC (permalink / raw)
  To: git; +Cc: Johannes Sixt

The goal of this series is to fix async procedures to the extent that
t5530-upload-pack-error.sh passes on Windows.

The problem is that on Windows async procedures are run in threads (due
to the lack of fork()), and a die() call from an async procedure tears
down the whole process while on POSIX only the async procedure is
terminated.

The approach taken is to use a custom die routine that exits only the
thread when it detects that it is not called from the main procedure.

As a bonus, the threaded async infrastructure now uses pthreads instead
of Windows specific API, and can be enabled on POSIX as well through a
new compile-time option.

Quite frankly, I don't quite know what to do with this series. On the
one hand, it is a clean-up, but in practice it is not relevant whether
die() kills only the async thread or the whole process because all
callers of async die() themselves anyway when the async procedure died.
On the other hand, it does enable threaded async procedures on POSIX...

Johannes Sixt (6):
  Modernize t5530-upload-pack-error.
  Make report() from usage.c public as vreportf() and use it.
  Fix signature of fcntl() compatibility dummy
  Windows: more pthreads functions
  Reimplement async procedures using pthreads
  Dying in an async procedure should only exit the thread, not the
    process.

 Makefile                     |    5 +++
 compat/mingw.h               |    2 +-
 compat/win32/pthread.c       |    8 ++++
 compat/win32/pthread.h       |   25 ++++++++++++++
 fast-import.c                |    8 ++---
 git-compat-util.h            |    1 +
 http-backend.c               |    5 +--
 run-command.c                |   75 ++++++++++++++++++++++++++++++++----------
 run-command.h                |    8 +++-
 t/t5530-upload-pack-error.sh |   18 +++++-----
 usage.c                      |   10 +++---
 11 files changed, 121 insertions(+), 44 deletions(-)

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2010-03-23 21:42 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-06 15:40 [PATCH 0/6] Pass t5530 on Windows Johannes Sixt
2010-03-06 20:12 ` Junio C Hamano
2010-03-06 21:50   ` Shawn O. Pearce
2010-03-09 20:00     ` [PATCH 7/6] Enable threaded async procedures whenever pthreads is available Johannes Sixt
2010-03-09 23:43       ` Shawn O. Pearce
2010-03-10 22:28       ` Junio C Hamano
2010-03-11 19:53         ` Johannes Sixt
2010-03-12  5:56           ` Junio C Hamano
2010-03-17 21:28         ` Johannes Sixt
2010-03-17 22:19           ` Junio C Hamano
2010-03-23  8:15           ` Fredrik Kuivinen
2010-03-23 20:19             ` Johannes Sixt
2010-03-23 20:25               ` Johannes Sixt
2010-03-23 20:44                 ` Junio C Hamano
2010-03-23 21:09                   ` Johannes Sixt
2010-03-23 21:42               ` Fredrik Kuivinen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.