qemu-devel
[Top][All Lists]
Advanced

[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

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]