projects
/
feisty_meow.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
trying speed=2 for burning bluray again
[feisty_meow.git]
/
nucleus
/
library
/
timely
/
timer_driver.cpp
diff --git
a/nucleus/library/timely/timer_driver.cpp
b/nucleus/library/timely/timer_driver.cpp
index c8186c726d6faf5afbe3006cd0a7838b9d37e2c0..8b6a5fbd6589d6aca233306fe316e62d220983d3 100644
(file)
--- a/
nucleus/library/timely/timer_driver.cpp
+++ b/
nucleus/library/timely/timer_driver.cpp
@@
-32,11
+32,11
@@
using namespace processes;
using namespace structures;
using namespace timely;
using namespace structures;
using namespace timely;
-
//
#define DEBUG_TIMER_DRIVER
+#define DEBUG_TIMER_DRIVER
// uncomment for noisy code.
#undef LOG
// uncomment for noisy code.
#undef LOG
-#define LOG(tpr) printf( (time_stamp::notarize() + "timer_driver::" + func + tpr).s() )
+#define LOG(tpr) printf(
"%s",
(time_stamp::notarize() + "timer_driver::" + func + tpr).s() )
namespace timely {
namespace timely {
@@
-102,7
+102,7
@@
void __stdcall timer_driver_private_handler(window_handle hwnd, basis::un_int ms
if (true) { // unknown OS.
#endif
#ifdef DEBUG_TIMER_DRIVER
if (true) { // unknown OS.
#endif
#ifdef DEBUG_TIMER_DRIVER
- LOG(a_sprintf("unknown signal/message %
x caught.", (void *)
seen));
+ LOG(a_sprintf("unknown signal/message %
d caught.",
seen));
#endif
return;
}
#endif
return;
}
@@
-150,7
+150,7
@@
timer_driver::timer_driver()
#if defined(__UNIX__) || defined(__GNU_WINDOWS__)
_prompter(new signalling_thread(INITIAL_TIMER_GRANULARITY)),
#else
#if defined(__UNIX__) || defined(__GNU_WINDOWS__)
_prompter(new signalling_thread(INITIAL_TIMER_GRANULARITY)),
#else
- _real_timer_id(N
IL
),
+ _real_timer_id(N
ULL_POINTER
),
#endif
_in_timer(false)
{
#endif
_in_timer(false)
{
@@
-159,7
+159,7
@@
timer_driver::timer_driver()
#ifdef __UNIX__
// register for the our personal signal.
signal(OUR_SIGNAL, &timer_driver_private_handler);
#ifdef __UNIX__
// register for the our personal signal.
signal(OUR_SIGNAL, &timer_driver_private_handler);
- _prompter->start(N
IL
);
+ _prompter->start(N
ULL_POINTER
);
#endif
}
#endif
}
@@
-173,13
+173,13
@@
timer_driver::~timer_driver()
struct sigaction action;
action.sa_handler = SIG_DFL;
struct sigaction action;
action.sa_handler = SIG_DFL;
- action.sa_sigaction = N
IL
;
+ action.sa_sigaction = N
ULL_POINTER
;
sigemptyset(&action.sa_mask);
action.sa_flags = 0;
#ifndef __APPLE__
sigemptyset(&action.sa_mask);
action.sa_flags = 0;
#ifndef __APPLE__
- action.sa_restorer = N
IL
;
+ action.sa_restorer = N
ULL_POINTER
;
#endif
#endif
- int ret = sigaction(OUR_SIGNAL, &action, N
IL
);
+ int ret = sigaction(OUR_SIGNAL, &action, N
ULL_POINTER
);
if (ret) {
///uhhh
}
if (ret) {
///uhhh
}
@@
-214,9
+214,9
@@
timer_driver::~timer_driver()
#endif
}
#endif
}
-#ifdef _MSC_VER
-basis::un_int *timer_driver::real_timer_id() { return _real_timer_id; }
-#endif
+
//
#ifdef _MSC_VER
+
//
basis::un_int *timer_driver::real_timer_id() { return _real_timer_id; }
+
//
#endif
bool timer_driver::zap_timer(timeable *to_remove)
{
bool timer_driver::zap_timer(timeable *to_remove)
{
@@
-404,13
+404,13
@@
void timer_driver::hookup_OS_timer(int duration)
#ifdef DEBUG_TIMER_DRIVER
LOG(a_sprintf("hooking next OS timer in %d ms.", duration));
#endif
#ifdef DEBUG_TIMER_DRIVER
LOG(a_sprintf("hooking next OS timer in %d ms.", duration));
#endif
-#if defined(__UNIX__) || defined(__GNU_WINDOWS__)
+
//
#if defined(__UNIX__) || defined(__GNU_WINDOWS__)
// just make our thread hit after the duration specified.
_prompter->reschedule(duration);
// just make our thread hit after the duration specified.
_prompter->reschedule(duration);
-#elif defined(_MSC_VER)
+
/*
#elif defined(_MSC_VER)
int max_tries_left = 100;
while (max_tries_left-- >= 0) {
int max_tries_left = 100;
while (max_tries_left-- >= 0) {
- _real_timer_id = (basis::un_int *)SetTimer(N
IL
, 0, duration,
+ _real_timer_id = (basis::un_int *)SetTimer(N
ULL_POINTER
, 0, duration,
timer_driver_private_handler);
if (!_real_timer_id) {
// failure to set the timer.
timer_driver_private_handler);
if (!_real_timer_id) {
// failure to set the timer.
@@
-421,6
+421,7
@@
void timer_driver::hookup_OS_timer(int duration)
break; // success hooking timer.
}
#endif
break; // success hooking timer.
}
#endif
+*/
}
void timer_driver::unhook_OS_timer()
}
void timer_driver::unhook_OS_timer()
@@
-428,12
+429,12
@@
void timer_driver::unhook_OS_timer()
#ifdef DEBUG_TIMER_DRIVER
FUNCDEF("unhook_OS_timer");
#endif
#ifdef DEBUG_TIMER_DRIVER
FUNCDEF("unhook_OS_timer");
#endif
-#if defined(__UNIX__) || defined(__GNU_WINDOWS__)
+
//
#if defined(__UNIX__) || defined(__GNU_WINDOWS__)
// postpone the thread for quite a while so we can take care of business.
_prompter->reschedule(LONG_TIME);
// postpone the thread for quite a while so we can take care of business.
_prompter->reschedule(LONG_TIME);
-#elif defined(_MSC_VER)
-
if (_real_timer_id) KillTimer(NIL
, (UINT_PTR)_real_timer_id);
-#endif
+
//
#elif defined(_MSC_VER)
+
// if (_real_timer_id) KillTimer(NULL_POINTER
, (UINT_PTR)_real_timer_id);
+
//
#endif
#ifdef DEBUG_TIMER_DRIVER
LOG("unhooked OS timer.");
#endif
#ifdef DEBUG_TIMER_DRIVER
LOG("unhooked OS timer.");
#endif