From 9174b0aca94fae0c483e2ae10608d660dc52f9c4 Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Mon, 26 Aug 2013 10:35:12 +0200 Subject: Create threads with a 32 KB stack rather than what happens to be the default. On Linux, the default stack size is typically 8 MB. Patch by Fabian Mauchle. --- udp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'udp.c') diff --git a/udp.c b/udp.c index efb5f09..ff7ad77 100644 --- a/udp.c +++ b/udp.c @@ -348,15 +348,15 @@ void initextraudp() { } if (client4_sock >= 0) - if (pthread_create(&cl4th, NULL, udpclientrd, (void *)&client4_sock)) + if (pthread_create(&cl4th, &pthread_attr, udpclientrd, (void *)&client4_sock)) debugx(1, DBG_ERR, "pthread_create failed"); if (client6_sock >= 0) - if (pthread_create(&cl6th, NULL, udpclientrd, (void *)&client6_sock)) + if (pthread_create(&cl6th, &pthread_attr, udpclientrd, (void *)&client6_sock)) debugx(1, DBG_ERR, "pthread_create failed"); if (find_clconf_type(handle, NULL)) { server_replyq = newqueue(); - if (pthread_create(&srvth, NULL, udpserverwr, (void *)server_replyq)) + if (pthread_create(&srvth, &pthread_attr, udpserverwr, (void *)server_replyq)) debugx(1, DBG_ERR, "pthread_create failed"); } } -- cgit v1.1