2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-25 15:07:05 +00:00

lib/ovs-thread: make use of the pthread_attr object

The pthread_attr object needs to be passed to the pthread_create()
call in order to make use of it.

Fixes: 8147cec9ee (lib/ovs-thread: Ensure that thread stacks are
                   always at least 512 kB.)
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
Acked-by: Andy Zhou <azhou@ovn.org>
This commit is contained in:
Alexandru Ardelean
2016-03-10 08:37:43 -08:00
committed by Andy Zhou
parent 8302b6d1ec
commit 5ffab04a5b

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2014, 2015 Nicira, Inc.
* Copyright (c) 2013, 2014, 2015, 2016 Nicira, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -386,7 +386,7 @@ ovs_thread_create(const char *name, void *(*start)(void *), void *arg)
pthread_attr_init(&attr);
set_min_stack_size(&attr, 512 * 1024);
error = pthread_create(&thread, NULL, ovsthread_wrapper, aux);
error = pthread_create(&thread, &attr, ovsthread_wrapper, aux);
if (error) {
ovs_abort(error, "pthread_create failed");
}