From c569fd76b48e5eef4df5cabdaf1d6b01ddedf61d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Tue, 5 Aug 2008 13:57:14 +0000 Subject: [PATCH] * Coding style cleanup, pointed out by Andreas. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26815 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/libroot/os/scheduler.c | 33 +++++++++++++++++-------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/src/system/libroot/os/scheduler.c b/src/system/libroot/os/scheduler.c index 79ee5a7920..5e52e0e6d3 100644 --- a/src/system/libroot/os/scheduler.c +++ b/src/system/libroot/os/scheduler.c @@ -1,5 +1,5 @@ -/* - * Copyright 2004-2007, Haiku. All rights reserved. +/* + * Copyright 2004-2008, Haiku. All rights reserved. * Distributed under the terms of the MIT License. * * Authors: @@ -14,7 +14,7 @@ static struct { uint32 what; int32 priority; -} gWhatPriorityArray[] = { +} sWhatPriorityArray[] = { // highest priority first {B_MIDI_PROCESSING, 0x78}, {B_AUDIO_RECORDING | B_AUDIO_PLAYBACK, 0x73}, @@ -30,28 +30,31 @@ static struct { {(uint32)-1, -1} }; -int32 -suggest_thread_priority(uint32 what, int32 period, bigtime_t jitter, bigtime_t length) + +int32 +suggest_thread_priority(uint32 what, int32 period, bigtime_t jitter, + bigtime_t length) { int i; int32 priority = what == B_DEFAULT_MEDIA_PRIORITY ? 0x0a : 0; // default priority - - for (i = 0; gWhatPriorityArray[i].what != (uint32)-1; i ++) { - if ((what & gWhatPriorityArray[i].what) != 0) { - priority = gWhatPriorityArray[i].priority; + + for (i = 0; sWhatPriorityArray[i].what != (uint32)-1; i ++) { + if ((what & sWhatPriorityArray[i].what) != 0) { + priority = sWhatPriorityArray[i].priority; break; } } - - return priority; + + return priority; } -bigtime_t -estimate_max_scheduling_latency(thread_id th) + +bigtime_t +estimate_max_scheduling_latency(thread_id thread) { - if (th == -1) - th = find_thread(NULL); + if (thread == -1) + thread = find_thread(NULL); return 0; }