Home GnuPG
Diffusion GnuPG 8416c875a729

estream: Implement "samethread" mode keyword.
8416c875a729Unpublished

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

estream: Implement "samethread" mode keyword.

* src/estream.c (estream_internal): Add field SAMETHREAD.
(init_stream_lock, lock_stream, trylock_stream, unlock_stream): Use it.
(parse_mode): Add arg SAMETHREAD and parse that keyword.
(es_initialize): Rename to ...
(init_stream_obj): this.  Add arg SAMETHREAD.
(es_create): Add arg SAMETHREAD.  Call init_stream_lock after
init_stream_obj.
(doreadline): Call es_create with samethread flag.
(es_fopen, es_mopen, es_fopenmem, es_fopencookie, do_fdopen)
(do_fpopen, do_w32open): Implement "samethread" keyword.
(es_freopen): Take samthread flag from old stream.
(es_tmpfile): Call es)_create w/o samethread.

Note: Unfortunately es_tmpfile has no mode arg so that we can't use
samethread.

Details

Provenance
wernerAuthored on Apr 15 2014, 4:40 PM
Parents
rGecea94461ed4: estream: Fix deadlock in es_fileno.
Branches
Unknown
Tags
Unknown

Event Timeline

Werner Koch <wk@gnupg.org> committed rG8416c875a729: estream: Implement "samethread" mode keyword. (authored by Werner Koch <wk@gnupg.org>).Apr 30 2014, 9:14 PM