Browse Source

core/sched: remove MODULE_NSS helpers (API CHANGE)

remove thread_getlastpid and last_pid from the API, it is unused
dev/timer
Ludwig Ortmann 9 years ago
parent
commit
a585eaf752
  1. 5
      core/include/sched.h
  2. 7
      core/include/thread.h
  3. 6
      core/sched.c
  4. 6
      core/thread.c

5
core/include/sched.h

@ -93,11 +93,6 @@ extern volatile int sched_num_threads;
*/
extern volatile int sched_active_pid;
/**
* Process ID of the thread that was active before the current one
*/
extern volatile int last_pid;
/**
* List of runqueues per priority level
*/

7
core/include/thread.h

@ -131,13 +131,6 @@ int thread_wakeup(int pid);
*/
int thread_getpid(void);
/**
* @brief Returns the process ID of the thread running before the current one
*
* @return obviously you are not a golfer.
*/
int thread_getlastpid(void);
/**
* @brief Measures the stack usage of a stack
*

6
core/sched.c

@ -45,7 +45,6 @@ volatile tcb_t *sched_threads[MAXTHREADS];
volatile tcb_t *sched_active_thread;
volatile int sched_active_pid = -1;
volatile int thread_last_pid = -1;
clist_node_t *sched_runqueues[SCHED_PRIO_LEVELS];
static uint32_t runqueue_bitcache = 0;
@ -104,11 +103,6 @@ void sched_run(void)
}
#endif
#ifdef MODULE_NSS
if (sched_active_thread && (my_next_pid != thread_last_pid)) {
thread_last_pid = sched_active_pid;
}
#endif
sched_active_pid = my_next_pid;
DEBUG("scheduler: next task: %s\n", my_active_thread->name);

6
core/thread.c

@ -37,12 +37,6 @@ inline int thread_getpid(void)
return sched_active_thread->pid;
}
int thread_getlastpid(void)
{
extern int thread_last_pid;
return thread_last_pid;
}
int thread_getstatus(int pid)
{
if (sched_threads[pid] == NULL) {

Loading…
Cancel
Save