mirror of https://github.com/BOINC/boinc.git
- 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:
parent
775e7cd67a
commit
dd797bc843
|
@ -37,6 +37,7 @@ extern void win_graphics_event_loop();
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#include <sched.h>
|
#include <sched.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
#include <sys/resource.h>
|
||||||
#include "x_opengl.h"
|
#include "x_opengl.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -139,6 +140,12 @@ int start_worker_thread(WORKER_FUNC_PTR _worker_main) {
|
||||||
// initialize ID of calling thread (the graphics-thread!)
|
// initialize ID of calling thread (the graphics-thread!)
|
||||||
graphics_thread = pthread_self();
|
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);
|
retval = pthread_create(&worker_thread, &worker_thread_attr, foobar, 0);
|
||||||
if (retval) return ERR_THREAD;
|
if (retval) return ERR_THREAD;
|
||||||
pthread_attr_destroy( &worker_thread_attr );
|
pthread_attr_destroy( &worker_thread_attr );
|
||||||
|
|
|
@ -4401,3 +4401,10 @@ David 4 May 2007
|
||||||
handle_request.C
|
handle_request.C
|
||||||
validator.C
|
validator.C
|
||||||
validate_util.h
|
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
|
||||||
|
|
|
@ -2,8 +2,6 @@
|
||||||
require_once("docutil.php");
|
require_once("docutil.php");
|
||||||
require_once("../html/inc/translation.inc");
|
require_once("../html/inc/translation.inc");
|
||||||
|
|
||||||
header('Content-Type: text/html; charset="UTF-8"');
|
|
||||||
|
|
||||||
function show_participant() {
|
function show_participant() {
|
||||||
global $light_blue;
|
global $light_blue;
|
||||||
$i = rand(0, 99);
|
$i = rand(0, 99);
|
||||||
|
|
Loading…
Reference in New Issue