1 | /* $Id: sched-generic.cpp 4071 2007-08-07 17:07:59Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * innotek Portable Runtime - Scheduling, generic stubs.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2006-2007 innotek GmbH
|
---|
8 | *
|
---|
9 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
10 | * available from http://www.virtualbox.org. This file is free software;
|
---|
11 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
12 | * General Public License as published by the Free Software Foundation,
|
---|
13 | * in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
|
---|
14 | * distribution. VirtualBox OSE is distributed in the hope that it will
|
---|
15 | * be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | */
|
---|
17 |
|
---|
18 |
|
---|
19 | /*******************************************************************************
|
---|
20 | * Header Files *
|
---|
21 | *******************************************************************************/
|
---|
22 | #define LOG_GROUP RTLOGGROUP_THREAD
|
---|
23 | #include <iprt/thread.h>
|
---|
24 | #include <iprt/log.h>
|
---|
25 | #include <iprt/assert.h>
|
---|
26 | #include <iprt/err.h>
|
---|
27 | #include "internal/sched.h"
|
---|
28 |
|
---|
29 |
|
---|
30 | /**
|
---|
31 | * Calculate the scheduling properties for all the threads in the default
|
---|
32 | * process priority, assuming the current thread have the type enmType.
|
---|
33 | *
|
---|
34 | * @returns iprt status code.
|
---|
35 | * @param enmType The thread type to be assumed for the current thread.
|
---|
36 | */
|
---|
37 | int rtSchedNativeCalcDefaultPriority(RTTHREADTYPE enmType)
|
---|
38 | {
|
---|
39 | Assert(enmType > RTTHREADTYPE_INVALID && enmType < RTTHREADTYPE_END);
|
---|
40 | return VINF_SUCCESS;
|
---|
41 | }
|
---|
42 |
|
---|
43 |
|
---|
44 | /**
|
---|
45 | * Validates and sets the process priority.
|
---|
46 | * This will check that all rtThreadNativeSetPriority() will success for all the
|
---|
47 | * thread types when applied to the current thread.
|
---|
48 | *
|
---|
49 | * @returns iprt status code.
|
---|
50 | * @param enmPriority The priority to validate and set.
|
---|
51 | * @remark Located in sched.
|
---|
52 | */
|
---|
53 | int rtProcNativeSetPriority(RTPROCPRIORITY enmPriority)
|
---|
54 | {
|
---|
55 | Assert(enmPriority > RTPROCPRIORITY_INVALID && enmPriority < RTPROCPRIORITY_LAST);
|
---|
56 | return VINF_SUCCESS;
|
---|
57 | }
|
---|
58 |
|
---|
59 |
|
---|
60 | /**
|
---|
61 | * Sets the priority of the thread according to the thread type
|
---|
62 | * and current process priority.
|
---|
63 | *
|
---|
64 | * The RTTHREADINT::enmType member has not yet been updated and will be updated by
|
---|
65 | * the caller on a successful return.
|
---|
66 | *
|
---|
67 | * @returns iprt status code.
|
---|
68 | * @param pThread The thread in question.
|
---|
69 | * @param enmType The thread type.
|
---|
70 | * @remark Located in sched.
|
---|
71 | */
|
---|
72 | int rtThreadNativeSetPriority(PRTTHREADINT pThread, RTTHREADTYPE enmType)
|
---|
73 | {
|
---|
74 | Assert(enmType > RTTHREADTYPE_INVALID && enmType < RTTHREADTYPE_END);
|
---|
75 | return VINF_SUCCESS;
|
---|
76 | }
|
---|
77 |
|
---|