forked from Imagelibrary/rtems
score: Rename _Scheduler_simple_Allocate(), etc.
Rename _Scheduler_simple_Allocate() in _Scheduler_default_Allocate(). Rename _Scheduler_simple_Free() in _Scheduler_default_Free().
This commit is contained in:
@@ -179,6 +179,7 @@ libscore_a_SOURCES += src/objectallocate.c src/objectclose.c \
|
||||
|
||||
## SCHEDULER_C_FILES
|
||||
libscore_a_SOURCES += src/scheduler.c
|
||||
libscore_a_SOURCES += src/schedulerdefaultallocatefree.c
|
||||
libscore_a_SOURCES += src/schedulerdefaultreleasejob.c
|
||||
libscore_a_SOURCES += src/schedulerdefaulttick.c
|
||||
libscore_a_SOURCES += src/schedulerdefaultstartidle.c
|
||||
|
||||
@@ -125,6 +125,26 @@ typedef struct {
|
||||
*/
|
||||
extern Scheduler_Control _Scheduler;
|
||||
|
||||
/**
|
||||
* @brief Returns an arbitrary non-NULL value.
|
||||
*
|
||||
* @param[in] thread Unused.
|
||||
*
|
||||
* @return An arbitrary non-NULL value.
|
||||
*/
|
||||
void *_Scheduler_default_Allocate(
|
||||
Thread_Control *thread
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Does nothing.
|
||||
*
|
||||
* @param[in] thread Unused.
|
||||
*/
|
||||
void _Scheduler_default_Free(
|
||||
Thread_Control *thread
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Does nothing.
|
||||
*
|
||||
|
||||
@@ -42,8 +42,8 @@ extern "C" {
|
||||
_Scheduler_simple_Yield, /* yield entry point */ \
|
||||
_Scheduler_simple_Block, /* block entry point */ \
|
||||
_Scheduler_simple_Unblock, /* unblock entry point */ \
|
||||
_Scheduler_simple_Allocate, /* allocate entry point */ \
|
||||
_Scheduler_simple_Free, /* free entry point */ \
|
||||
_Scheduler_default_Allocate, /* allocate entry point */ \
|
||||
_Scheduler_default_Free, /* free entry point */ \
|
||||
_Scheduler_simple_Update, /* update entry point */ \
|
||||
_Scheduler_simple_Enqueue, /* enqueue entry point */ \
|
||||
_Scheduler_simple_Enqueue_first, /* enqueue_first entry point */ \
|
||||
@@ -149,23 +149,6 @@ void _Scheduler_simple_Enqueue_first(
|
||||
Thread_Control *the_thread
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Return empty placeholder for the simple scheduler.
|
||||
*
|
||||
* This routine is a place holder for any memeory allocation needed
|
||||
* by the scheduler. For the simple scheduler the routine is an empty
|
||||
* place holder.
|
||||
*
|
||||
* @param[in] the_thread is the thread the scheduler is allocating
|
||||
* management memory for
|
||||
*
|
||||
* @retval this routine returns -1 since this is just an empty placeholder
|
||||
* and the return value may be defined differently by each scheduler.
|
||||
*/
|
||||
void *_Scheduler_simple_Allocate(
|
||||
Thread_Control *the_thread
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Stub for simple schedule update.
|
||||
*
|
||||
@@ -178,18 +161,6 @@ void _Scheduler_simple_Update(
|
||||
Thread_Control *the_thread
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Stub for simple schedule free.
|
||||
*
|
||||
* This routine does nothing, and is used as a stub for Schedule free
|
||||
* The overhead of a function call will still be imposed.
|
||||
*
|
||||
* @param[in] the_thread is the thread to be blocked
|
||||
*/
|
||||
void _Scheduler_simple_Free(
|
||||
Thread_Control *the_thread
|
||||
);
|
||||
|
||||
/**
|
||||
* _Scheduler_simple_Ready_queue_enqueue
|
||||
*
|
||||
|
||||
@@ -64,8 +64,8 @@ typedef struct {
|
||||
_Scheduler_simple_smp_Yield, \
|
||||
_Scheduler_simple_smp_Extract, \
|
||||
_Scheduler_simple_smp_Enqueue_priority_fifo, \
|
||||
_Scheduler_simple_Allocate, \
|
||||
_Scheduler_simple_Free, \
|
||||
_Scheduler_default_Allocate, \
|
||||
_Scheduler_default_Free, \
|
||||
_Scheduler_simple_Update, \
|
||||
_Scheduler_simple_smp_Enqueue_priority_fifo, \
|
||||
_Scheduler_simple_smp_Enqueue_priority_lifo, \
|
||||
|
||||
38
cpukit/score/src/schedulerdefaultallocatefree.c
Normal file
38
cpukit/score/src/schedulerdefaultallocatefree.c
Normal file
@@ -0,0 +1,38 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @brief Scheduler Default Allocate and Release Operation
|
||||
*
|
||||
* @ingroup ScoreScheduler
|
||||
*/
|
||||
|
||||
/*
|
||||
* COPYRIGHT (c) 2011.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*/
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <rtems/score/scheduler.h>
|
||||
|
||||
void *_Scheduler_default_Allocate(
|
||||
Thread_Control *thread
|
||||
)
|
||||
{
|
||||
( void ) thread;
|
||||
|
||||
return ( void * )-1; /* maybe pick an appropriate poison value */
|
||||
}
|
||||
|
||||
void _Scheduler_default_Free(
|
||||
Thread_Control *thread
|
||||
)
|
||||
{
|
||||
( void ) thread;
|
||||
}
|
||||
@@ -23,25 +23,12 @@
|
||||
#include <rtems/score/chainimpl.h>
|
||||
#include <rtems/score/wkspace.h>
|
||||
|
||||
void * _Scheduler_simple_Allocate(
|
||||
Thread_Control *the_thread
|
||||
)
|
||||
{
|
||||
return (void*)-1; /* maybe pick an appropriate poison value */
|
||||
}
|
||||
|
||||
void _Scheduler_simple_Update(
|
||||
Thread_Control *the_thread
|
||||
)
|
||||
{
|
||||
}
|
||||
|
||||
void _Scheduler_simple_Free(
|
||||
Thread_Control *the_thread
|
||||
)
|
||||
{
|
||||
}
|
||||
|
||||
void _Scheduler_simple_Initialize ( void )
|
||||
{
|
||||
void *f;
|
||||
|
||||
Reference in New Issue
Block a user