diff options
author | Miller Puckette <millerpuckette@users.sourceforge.net> | 2005-08-19 23:28:03 +0000 |
---|---|---|
committer | Miller Puckette <millerpuckette@users.sourceforge.net> | 2005-08-19 23:28:03 +0000 |
commit | d6a71adae7c90224e2a49f0edcd4fd52fa0a1b30 (patch) | |
tree | 3ff96fa9bd7aceaeb5c832c097788c80a98bee17 /pd/src/s_inter.c | |
parent | 8892fb6aabcbfd2c4695c154c22751b5fe5c9004 (diff) |
Version 0.39-0test5. Bug fixes and more care about closing dirty windows
and quitting.
svn path=/trunk/; revision=3434
Diffstat (limited to 'pd/src/s_inter.c')
-rw-r--r-- | pd/src/s_inter.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/pd/src/s_inter.c b/pd/src/s_inter.c index f77b5e84..814e2834 100644 --- a/pd/src/s_inter.c +++ b/pd/src/s_inter.c @@ -174,7 +174,13 @@ static int sys_domicrosleep(int microsec, int pollem) for (i = 0; i < sys_nfdpoll; i++) if (FD_ISSET(sys_fdpoll[i].fdp_fd, &readset)) { +#ifdef THREAD_LOCKING + sys_lock(); +#endif (*sys_fdpoll[i].fdp_fn)(sys_fdpoll[i].fdp_ptr, sys_fdpoll[i].fdp_fd); +#ifdef THREAD_LOCKING + sys_unlock(); +#endif didsomething = 1; } return (didsomething); @@ -280,10 +286,12 @@ void sys_set_priority(int higher) #ifdef _POSIX_MEMLOCK /* tb: force memlock to physical memory { */ - struct rlimit mlock_limit; - mlock_limit.rlim_cur=0; - mlock_limit.rlim_max=0; - setrlimit(RLIMIT_MEMLOCK,&mlock_limit); + { + struct rlimit mlock_limit; + mlock_limit.rlim_cur=0; + mlock_limit.rlim_max=0; + setrlimit(RLIMIT_MEMLOCK,&mlock_limit); + } /* } tb */ if (mlockall(MCL_FUTURE) != -1) fprintf(stderr, "memory locking enabled.\n"); @@ -1087,7 +1095,7 @@ int sys_startgui(const char *guidir) sys_guicmd = cmdbuf; } if (sys_verbose) fprintf(stderr, "%s", sys_guicmd); - execl("/bin/sh", "sh", "-c", sys_guicmd, 0); + execl("/bin/sh", "sh", "-c", sys_guicmd, (char*)0); perror("pd: exec"); _exit(1); } @@ -1171,7 +1179,7 @@ int sys_startgui(const char *guidir) sprintf(cmdbuf, "%s/pd-watchdog\n", guidir); if (sys_verbose) fprintf(stderr, "%s", cmdbuf); - execl("/bin/sh", "sh", "-c", cmdbuf, 0); + execl("/bin/sh", "sh", "-c", cmdbuf, (char*)0); perror("pd: exec"); _exit(1); } |