[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH V4 1/6] oslib-posix: add helpers for stack alloc
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH V4 1/6] oslib-posix: add helpers for stack alloc and free |
Date: |
Tue, 12 Jul 2016 09:32:51 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
On 07/12/2016 08:41 AM, Peter Lieven wrote:
>> I wonder if the _SC_THREAD_STACK_MIN constant exists if there is no minimum?
>
> Update:
>
> glibc basically does the following:
>
> static gulong g_thread_min_stack_size = 0;
>
> #ifdef _SC_THREAD_STACK_MIN
> g_thread_min_stack_size = MAX (sysconf (_SC_THREAD_STACK_MIN), 0);
> #endif /* _SC_THREAD_STACK_MIN */
>
> stack_size = MAX (g_thread_min_stack_size, stack_size);
>
>
> So we should do sth similar, I think?!
Yes, that would be a good pattern to copy.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
[Qemu-devel] [PATCH V4 2/6] coroutine: add a macro for the coroutine stack size, Peter Lieven, 2016/07/11
[Qemu-devel] [PATCH V4 5/6] oslib-posix: add a configure switch to debug stack usage, Peter Lieven, 2016/07/11
[Qemu-devel] [PATCH V4 4/6] coroutine-sigaltstack: use helper for allocating stack memory, Peter Lieven, 2016/07/11
[Qemu-devel] [PATCH V4 3/6] coroutine-ucontext: use helper for allocating stack memory, Peter Lieven, 2016/07/11