VirtualBox

source: vbox/trunk/src/VBox/Runtime/generic/sched-generic.cpp@ 1

Last change on this file since 1 was 1, checked in by vboxsync, 55 years ago

import

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.6 KB
Line 
1/* $Id: sched-generic.cpp 1 1970-01-01 00:00:00Z vboxsync $ */
2/** @file
3 * InnoTek Portable Runtime - Scheduling, generic stubs.
4 */
5
6/*
7 * Copyright (C) 2006 InnoTek Systemberatung 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 * If you received this file as part of a commercial VirtualBox
18 * distribution, then only the terms of your commercial VirtualBox
19 * license agreement apply instead of the previous paragraph.
20 */
21
22
23/*******************************************************************************
24* Header Files *
25*******************************************************************************/
26#define LOG_GROUP RTLOGGROUP_THREAD
27#include <iprt/thread.h>
28#include <iprt/log.h>
29#include <iprt/assert.h>
30#include <iprt/err.h>
31#include "internal/sched.h"
32
33
34/**
35 * Calculate the scheduling properties for all the threads in the default
36 * process priority, assuming the current thread have the type enmType.
37 *
38 * @returns iprt status code.
39 * @param enmType The thread type to be assumed for the current thread.
40 */
41int rtSchedNativeCalcDefaultPriority(RTTHREADTYPE enmType)
42{
43 Assert(enmType > RTTHREADTYPE_INVALID && enmType < RTTHREADTYPE_LAST);
44 return VINF_SUCCESS;
45}
46
47
48/**
49 * Validates and sets the process priority.
50 * This will check that all rtThreadNativeSetPriority() will success for all the
51 * thread types when applied to the current thread.
52 *
53 * @returns iprt status code.
54 * @param enmPriority The priority to validate and set.
55 * @remark Located in sched.
56 */
57int rtProcNativeSetPriority(RTPROCPRIORITY enmPriority)
58{
59 Assert(enmPriority > RTPROCPRIORITY_INVALID && enmPriority < RTPROCPRIORITY_LAST);
60 return VINF_SUCCESS;
61}
62
63
64/**
65 * Sets the priority of the thread according to the thread type
66 * and current process priority.
67 *
68 * The RTTHREADINT::enmType member has not yet been updated and will be updated by
69 * the caller on a successful return.
70 *
71 * @returns iprt status code.
72 * @param pThread The thread in question.
73 * @param enmType The thread type.
74 * @remark Located in sched.
75 */
76int rtThreadNativeSetPriority(PRTTHREADINT pThread, RTTHREADTYPE enmType)
77{
78 Assert(enmType > RTTHREADTYPE_INVALID && enmType < RTTHREADTYPE_LAST);
79 return VINF_SUCCESS;
80}
81
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette