Changeset 397 for branches/merlin
- Timestamp:
- 09/04/09 13:53:38 (15 years ago)
- Location:
- branches/merlin
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/merlin/include/oscam.h
r394 r397 25 25 int oscam_process_input(uchar *, int, int); 26 26 void oscam_set_signal_handler(int, int, void (*)(int)); 27 void oscam_set_priority(int); 27 28 void oscam_log_config(); 28 29 struct timeval *oscam_chk_pending(struct timeb tp_ctimeout); -
branches/merlin/include/simples.h
r396 r397 28 28 void cs_sleepms(int); 29 29 int bytes_available(int); 30 void cs_setpriority(int);31 30 int file_exists (const char *); 32 31 -
branches/merlin/src/config.c
r395 r397 312 312 cfg->nice = 99; 313 313 if (cfg->nice != 99) 314 cs_setpriority(cfg->nice); // ignore errors314 oscam_set_priority(cfg->nice); // ignore errors 315 315 } 316 316 if (!strcmp(token, "serialreadertimeout")) { -
branches/merlin/src/oscam.c
r395 r397 323 323 #endif 324 324 } 325 326 #ifdef OS_CYGWIN32 327 # include <windows.h> 328 void oscam_set_priority(int prio) 329 { 330 HANDLE WinId; 331 ulong wprio; 332 333 switch ((prio + 20) / 10) { 334 case 0: 335 wprio = REALTIME_PRIORITY_CLASS; 336 break; 337 case 1: 338 wprio = HIGH_PRIORITY_CLASS; 339 break; 340 case 2: 341 wprio = NORMAL_PRIORITY_CLASS; 342 break; 343 default: 344 wprio = IDLE_PRIORITY_CLASS; 345 break; 346 } 347 WinId = GetCurrentProcess(); 348 SetPriorityClass(WinId, wprio); 349 } 350 #else 351 void oscam_set_priority(int prio) 352 { 353 # ifdef PRIO_PROCESS 354 setpriority(PRIO_PROCESS, 0, prio); // ignore errors 355 # endif 356 } 357 #endif 325 358 326 359 static void oscam_alarm(int sig) -
branches/merlin/src/simples.c
r396 r397 331 331 } 332 332 333 #ifdef OS_CYGWIN32334 # include <windows.h>335 void cs_setpriority(int prio)336 {337 HANDLE WinId;338 ulong wprio;339 340 switch ((prio + 20) / 10) {341 case 0:342 wprio = REALTIME_PRIORITY_CLASS;343 break;344 case 1:345 wprio = HIGH_PRIORITY_CLASS;346 break;347 case 2:348 wprio = NORMAL_PRIORITY_CLASS;349 break;350 default:351 wprio = IDLE_PRIORITY_CLASS;352 break;353 }354 WinId = GetCurrentProcess();355 SetPriorityClass(WinId, wprio);356 }357 #else358 void cs_setpriority(int prio)359 {360 # ifdef PRIO_PROCESS361 setpriority(PRIO_PROCESS, 0, prio); // ignore errors362 # endif363 }364 #endif365 366 333 int file_exists (const char *filepath) { 367 334 FILE *file = fopen(filepath, "r");
Note:
See TracChangeset
for help on using the changeset viewer.