RTEMS 5.2
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
pthreadimpl.h
Go to the documentation of this file.
1
10/*
11 * COPYRIGHT (c) 1989-2011.
12 * On-Line Applications Research Corporation (OAR).
13 *
14 * The license and distribution terms for this file may be
15 * found in the file LICENSE in this distribution or at
16 * http://www.rtems.org/license/LICENSE.
17 */
18
19#ifndef _RTEMS_POSIX_PTHREADIMPL_H
20#define _RTEMS_POSIX_PTHREADIMPL_H
21
22#include <rtems/posix/pthread.h>
24#include <rtems/score/assert.h>
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
42#define PTHREAD_MINIMUM_STACK_SIZE _POSIX_Threads_Minimum_stack_size
43
44#if defined(RTEMS_POSIX_API)
45RTEMS_INLINE_ROUTINE void _POSIX_Threads_Sporadic_timer_insert(
46 Thread_Control *the_thread,
47 POSIX_API_Control *api
48)
49{
50 the_thread->cpu_time_budget =
51 _Timespec_To_ticks( &api->Sporadic.sched_ss_init_budget );
52
54 &api->Sporadic.Timer,
55 _Per_CPU_Get(),
56 _Timespec_To_ticks( &api->Sporadic.sched_ss_repl_period )
57 );
58}
59#endif
60
61void _POSIX_Threads_Sporadic_timer( Watchdog_Control *watchdog );
62
72 Thread_Control *the_thread
73);
74
75int _POSIX_Thread_Translate_to_sched_policy(
76 Thread_CPU_budget_algorithms budget_algorithm
77);
78
94 int policy,
95 const struct sched_param *param,
96 Thread_CPU_budget_algorithms *budget_algorithm,
98);
99
100RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate(void)
101{
103
105
106 return (Thread_Control *)
108}
109
110RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free (
111 Thread_Control *the_pthread
112)
113{
115}
116
119#ifdef __cplusplus
120}
121#endif
122
123#endif
124/* end of include file */
Information for the Assert Handler.
Thread_Information _POSIX_Threads_Information
int _POSIX_Thread_Translate_sched_param(int policy, const struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout)
Translate sched_param into SuperCore terms.
Definition: psxtransschedparam.c:44
void _POSIX_Threads_Sporadic_budget_callout(Thread_Control *the_thread)
POSIX threads sporadic budget callout.
#define RTEMS_INLINE_ROUTINE
Definition: basedefs.h:66
RTEMS_INLINE_ROUTINE void _Objects_Free(Objects_Information *information, Objects_Control *the_object)
Frees an object.
Definition: objectimpl.h:930
RTEMS_INLINE_ROUTINE Objects_Control * _Objects_Allocate_unprotected(Objects_Information *information)
Allocates an object without locking the allocator mutex.
Definition: objectimpl.h:874
RTEMS_INLINE_ROUTINE void _Objects_Allocator_lock(void)
Locks the object allocator mutex.
Definition: objectimpl.h:831
void(* Thread_CPU_budget_algorithm_callout)(Thread_Control *)
Definition: thread.h:178
void _Thread_Kill_zombies(void)
Kills all zombie threads in the system.
Definition: threadrestart.c:216
Thread_CPU_budget_algorithms
Definition: thread.h:164
RTEMS_INLINE_ROUTINE uint64_t _Watchdog_Per_CPU_insert_ticks(Watchdog_Control *the_watchdog, Per_CPU_Control *cpu, Watchdog_Interval ticks)
Sets the watchdog's cpu to the given instance and sets its expiration time to the watchdog expiration...
Definition: watchdogimpl.h:593
uint32_t _Timespec_To_ticks(const struct timespec *time)
Converts timespec to number of ticks.
Definition: timespectoticks.c:27
Inlined Routines in the Object Handler.
POSIX Threads Private Support.
Contains Helpers for Manipulating Timespecs.
Objects_Information Objects
The object information.
Definition: thread.h:1001
The control block used to manage each watchdog timer.
Definition: watchdog.h:90
Definition: thread.h:732
Objects_Control Object
Definition: thread.h:734
uint32_t cpu_time_budget
Definition: thread.h:816
Inlined Routines from the Thread Handler.
POSIX Thread API Support.
Inlined Routines in the Watchdog Handler.