]> xenbits.xensource.com Git - xen.git/commit
tools/xenstore: try to get minimum thread stack size for watch thread
authorJuergen Gross <jgross@suse.com>
Mon, 26 Feb 2018 08:46:12 +0000 (09:46 +0100)
committerWei Liu <wei.liu2@citrix.com>
Fri, 2 Mar 2018 17:26:57 +0000 (17:26 +0000)
commit448c03b3cbe14873ee637755a29ea26ee7ca9ef9
treed001dfd3ccbe1abf4b6d6df09f488f6330c58af9
parent5cfbd651da3c30a5137488b06e39803cbaacc2b0
tools/xenstore: try to get minimum thread stack size for watch thread

When creating a pthread in xs_watch() try to get the minimal needed
size of the thread from glibc instead of using a constant. This avoids
problems when the library is used in programs with large per-thread
memory.

Use dlsym() to get the pointer to __pthread_get_minstack() in order to
avoid linkage problems and fall back to the current constant size if
not found.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Tested-by: Jim Fehlig <jfehlig@suse.com>
tools/xenstore/Makefile
tools/xenstore/xs.c