Skip to content

Commit

Permalink
lib/ovs-thread: make use of the pthread_attr object
Browse files Browse the repository at this point in the history
The pthread_attr object needs to be passed to the pthread_create()
call in order to make use of it.

Fixes: 8147cec (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>
  • Loading branch information
commodo authored and azhou-nicira committed Mar 16, 2016
1 parent 4846f3e commit 74f1fc4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/ovs-thread.c
@@ -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.
Expand Down Expand Up @@ -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");
}
Expand Down

0 comments on commit 74f1fc4

Please sign in to comment.