Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
David MacDonald
purr-data
Commits
d12f5895
Commit
d12f5895
authored
Jan 22, 2008
by
Miller Puckette
Browse files
dynamic scheduler loading extended to non-MSW platforms
parent
e52bf184
Changes
4
Hide whitespace changes
Inline
Side-by-side
doc/1.manual/x5.htm
View file @
d12f5895
...
...
@@ -20,6 +20,56 @@
<H3>
<A
name=
"s2"
>
5.1. release notes
</A>
</H3>
<P>
------------------ 0.41 ----------------------------
<P>
Pd may be compiled in 64 bit address spaces; this is well tested on
linux and at least seems to work on Microsoft and MacOS. On linux, in fact,
if you compile Pd in a 64-bit version of the OS it's automatically in the
64 bit address space.
<P>
In linux, a "-nosleep" flag causes Pd to poll instead of sleeping as it
waits for dac and adc; this is useful on multiprocessors when you don't mind
having Pd occupy 100% of one processor and want to get latency as low as
possible. (If you don't use this, latency on multiprocessors---Intel Core 2 at
least---is much worse for some reason than it is on uniprocessors.) It's
"experimental" but I use it every day.
<P>
added an experimental callback scheduler. This might reduce latency in
MacOS and/or Microsoft, although I haven't seen that actually happen yet.
<P>
removed limitation on huge messages from text files; this prevented long
"data" arrays from reloading from disk correctly.
<P>
fixed crash bug closing patches with open GOPs.
<P>
changed selection strategy so that, right after duplicating a collection
of objects, clicking tends to select an already-selected object.
<P>
the cursor changes slightly more apprpriately when switching between edit
to run modes.
<P>
got really confused about the proper role of "declare 'path" in abstractions;
for the moment they are ignored. I the future, it may be worthwhile to allow
them but to have them act only locally to the abstraction; but this might mean
a lot more computation overhead when opening files.
<P>
limited window sizes to that of the screen (otherwise, on Mac OS, it's
impossible to resize them.)
<P>
fixed "startup" dialogs to allow unlimited "path" and "lib" entries
<P>
started, but didn't finish, the process of getting Pd to compile with
t_float as 64 bits. This would slow Pd down but improve tabread4~'s accuracy.
<P>
made IEM Guis respect "-font" flag and friends. New startup flags:
"-font-face" (badly named); "-font-size" sysnonym of "-font". (Large patch from
HC).
<P>
String overflow protection here and there.
<P>
migrated to ".net" compiler ("VC 2005", a free download).
<P>
------------------ 0.40-1 --------------------------
<P>
Fixed "declare" which wasn't working properly yet in 0.40-0, and
...
...
src/notes.txt
View file @
d12f5895
---------------- dolist --------------------
fixed crash bug closing patches with open GOPs
fixed PC device counting problem (first device invoked by -audiodev 0)
fixed MSTACKSIZE limitation in m_binbuf.c
fixed so that if more than one object is selected, clicking prefers to
"hit" a selected one (better dragging after "duplicate")
test:
compile on various versions of linux
windows:
...
...
src/s_loader.c
View file @
d12f5895
...
...
@@ -238,3 +238,37 @@ int sys_load_lib(t_canvas *canvas, char *classname)
return
ok
;
}
int
sys_run_scheduler
(
const
char
*
externalschedlibname
,
const
char
*
sys_extraflagsstring
)
{
typedef
int
(
*
t_externalschedlibmain
)(
const
char
*
);
t_externalschedlibmain
externalmainfunc
;
char
filename
[
MAXPDSTRING
];
snprintf
(
filename
,
sizeof
(
filename
),
"%s.%s"
,
externalschedlibname
,
sys_dllextent
);
sys_bashfilename
(
filename
,
filename
);
#ifdef MSW
{
HINSTANCE
ntdll
=
LoadLibrary
(
filename
);
if
(
!
ntdll
)
{
post
(
"%s: couldn't load external scheduler lib "
,
filename
);
return
(
0
);
}
externalmainfunc
=
(
t_externalschedlibmain
)
GetProcAddress
(
ntdll
,
"main"
);
}
#else
{
void
*
dlobj
=
dlopen
(
filename
,
RTLD_NOW
|
RTLD_GLOBAL
);
if
(
!
dlobj
)
{
post
(
"%s: %s"
,
filename
,
dlerror
());
return
(
0
);
}
externalmainfunc
=
(
t_externalschedlibmain
)
dlsym
(
dlobj
,
"pd_extern_sched"
);
}
#endif
return
((
*
externalmainfunc
)(
sys_extraflagsstring
));
}
src/s_main.c
View file @
d12f5895
...
...
@@ -77,7 +77,8 @@ int sys_externalschedlib;
char
sys_externalschedlibname
[
MAXPDSTRING
];
int
sys_extraflags
;
char
sys_extraflagsstring
[
MAXPDSTRING
];
int
sys_run_scheduler
(
const
char
*
externalschedlibname
,
const
char
*
sys_extraflagsstring
);
/* here the "-1" counts signify that the corresponding vector hasn't been
specified in command line arguments; sys_set_audio_settings will detect it
...
...
@@ -291,28 +292,8 @@ int sys_main(int argc, char **argv)
if
(
sys_startgui
(
sys_guidir
->
s_name
))
/* start the gui */
return
(
1
);
if
(
sys_externalschedlib
)
{
#ifdef MSW
typedef
int
(
*
t_externalschedlibmain
)(
char
*
);
t_externalschedlibmain
externalmainfunc
;
HINSTANCE
ntdll
;
char
filename
[
MAXPDSTRING
];
snprintf
(
filename
,
sizeof
(
filename
),
"%s.dll"
,
sys_externalschedlibname
);
sys_bashfilename
(
filename
,
filename
);
ntdll
=
LoadLibrary
(
filename
);
if
(
!
ntdll
)
{
post
(
"%s: couldn't load external scheduler lib "
,
filename
);
return
(
0
);
}
externalmainfunc
=
(
t_externalschedlibmain
)
GetProcAddress
(
ntdll
,
"main"
);
return
((
*
externalmainfunc
)(
sys_extraflagsstring
));
#else
return
(
0
);
#endif
}
return
(
sys_run_scheduler
(
sys_externalschedlibname
,
sys_extraflagsstring
));
else
{
/* open audio and MIDI */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment