pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Munro <tmunro@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: pgbench: Refactor thread portability support.
Date: Wed, 10 Mar 2021 04:52:01 +0000
Message-ID: <E1lJqpF-00064d-Bk@gemulon.postgresql.org> (raw)

pgbench: Refactor thread portability support.

Instead of maintaining an incomplete emulation of POSIX threads for
Windows, let's use an extremely minimalist macro-based abstraction for
now.  A later patch will extend this, without the need to supply more
complicated pthread emulation code.  (There may be a need for a more
serious portable thread abstraction in later projects, but this is not
it.)

Minor incidental problems fixed: it wasn't OK to use (pthread_t) 0 as a
special value, it wasn't OK to compare thread_t values with ==, and we
incorrectly assumed that pthread functions set errno.

Discussion: https://postgr.es/m/20200227180100.zyvjwzcpiokfsqm2%40alap3.anarazel.de

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/b1d6a8f86813772b9198367a34c8ff8bff7fef9e

Modified Files
--------------
src/bin/pgbench/pgbench.c | 126 ++++++++++++----------------------------------
1 file changed, 31 insertions(+), 95 deletions(-)



view thread (7+ messages)  latest in thread

Message-ID: <E1lJqpF-00064d-Bk@gemulon.postgresql.org>
Permalink:  ../E1lJqpF-00064d-Bk@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1lJqpF-00064d-Bk@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tmunro@postgresql.org
  Subject: Re: pgsql: pgbench: Refactor thread portability support.
  In-Reply-To: <E1lJqpF-00064d-Bk@gemulon.postgresql.org>
  References: <E1lJqpF-00064d-Bk@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox