- API: if using graphics, set worker thread stack size limit to max

(from Rosetta@home)
    
    api/
        graphics_impl.C

svn path=/trunk/boinc/; revision=12562
This commit is contained in:
David Anderson 2007-05-04 20:06:00 +00:00
parent 775e7cd67a
commit dd797bc843
3 changed files with 14 additions and 2 deletions

View File

@ -37,6 +37,7 @@ extern void win_graphics_event_loop();
#include <pthread.h>
#include <sched.h>
#include <signal.h>
#include <sys/resource.h>
#include "x_opengl.h"
#endif
@ -139,6 +140,12 @@ int start_worker_thread(WORKER_FUNC_PTR _worker_main) {
// initialize ID of calling thread (the graphics-thread!)
graphics_thread = pthread_self();
// set work stack size to max
//
struct rlimit rlim;
getrlimit(RLIMIT_STACK, &rlim);
pthread_attr_setstacksize(&worker_thread_attr, rlim.rlim_max);
retval = pthread_create(&worker_thread, &worker_thread_attr, foobar, 0);
if (retval) return ERR_THREAD;
pthread_attr_destroy( &worker_thread_attr );

View File

@ -4401,3 +4401,10 @@ David 4 May 2007
handle_request.C
validator.C
validate_util.h
David 4 May 2007
- API: if using graphics, set worker thread stack size limit to max
(from Rosetta@home)
api/
graphics_impl.C

View File

@ -2,8 +2,6 @@
require_once("docutil.php");
require_once("../html/inc/translation.inc");
header('Content-Type: text/html; charset="UTF-8"');
function show_participant() {
global $light_blue;
$i = rand(0, 99);