Changeset 3b14b7ad in rtems


Ignore:
Timestamp:
Aug 8, 2008, 1:50:28 PM (11 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.9, master
Children:
2975e71
Parents:
8ad2468c
Message:

2008-08-05 Sebastian Huber <sebastian.huber@…>

  • libmisc/monitor/monitor.h, rtems/include/rtems/rtems/tasks.h, score/include/rtems/score/thread.h, score/src/threadreset.c, score/src/threadrestart.c, score/src/threadstart.c: New type Thread_Entry_numeric_type for numeric arguments in thread entry functions with at least one numeric argument.
Location:
cpukit
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    r8ad2468c r3b14b7ad  
     12008-08-04      Joel Sherrill <joel.sherrill@OARcorp.com>
     2
     3        * posix/src/mqueuetimedreceive.c, posix/src/mqueuetimedsend.c: Fix
     4        warnings.
     5
    162008-08-07      Joel Sherrill <joel.sherrill@OARcorp.com>
    27
  • cpukit/libmisc/monitor/monitor.h

    r8ad2468c r3b14b7ad  
    9595 */
    9696typedef struct {
    97     rtems_id            id;
    98     rtems_name          name;
    99   /* end of common portion */
    100     Thread_Entry        entry;
    101     uint32_t            argument;
    102     void               *stack;
    103     uint32_t            stack_size;
    104     rtems_task_priority priority;
    105     States_Control      state;
    106     rtems_event_set     events;
    107     rtems_mode          modes;
    108     rtems_attribute     attributes;
    109     uint32_t            notepad[RTEMS_NUMBER_NOTEPADS];
    110     rtems_id            wait_id;
    111     uint32_t            wait_args;
    112     uint32_t            ticks;
     97    rtems_id                   id;
     98    rtems_name                 name;
     99  /* end of common portion */
     100    Thread_Entry               entry;
     101    Thread_Entry_numeric_type  argument;
     102    void                      *stack;
     103    uint32_t                   stack_size;
     104    rtems_task_priority        priority;
     105    States_Control             state;
     106    rtems_event_set            events;
     107    rtems_mode                 modes;
     108    rtems_attribute            attributes;
     109    uint32_t                   notepad[RTEMS_NUMBER_NOTEPADS];
     110    rtems_id                   wait_id;
     111    uint32_t                   wait_args;
     112    uint32_t                   ticks;
    113113} rtems_monitor_task_t;
    114114
  • cpukit/rtems/include/rtems/rtems/tasks.h

    r8ad2468c r3b14b7ad  
    167167 *  The following defines the argument to an RTEMS task.
    168168 */
    169 typedef uintptr_t  rtems_task_argument;
     169typedef Thread_Entry_numeric_type rtems_task_argument;
    170170
    171171/**
  • cpukit/score/include/rtems/score/thread.h

    r8ad2468c r3b14b7ad  
    7979
    8080/**
     81 *  @brief Type of the numeric argument of a thread entry function with at
     82 *  least one numeric argument.
     83 *
     84 *  This numeric argument type designates an unsigned integer type with the
     85 *  property that any valid pointer to void can be converted to this type and
     86 *  then converted back to a pointer to void.  The result will compare equal to
     87 *  the original pointer.
     88 */
     89typedef uintptr_t Thread_Entry_numeric_type;
     90
     91/**
    8192 *  The following defines the ways in which the entry point for a
    8293 *  thread can be invoked.  Basically, it can be passed any
     
    98109 *  unsigned thirty-two bit integer as an argument.
    99110 */
    100 typedef Thread ( *Thread_Entry_numeric )( uint32_t  );
     111typedef Thread ( *Thread_Entry_numeric )( Thread_Entry_numeric_type );
    101112
    102113/** This type corresponds to a thread entry point which takes a single
     
    108119 *  untyped pointer and an unsigned thirty-two bit integer as arguments.
    109120 */
    110 typedef Thread ( *Thread_Entry_both_pointer_first )( void *, uint32_t  );
     121typedef Thread ( *Thread_Entry_both_pointer_first )( void *, Thread_Entry_numeric_type );
    111122
    112123/** This type corresponds to a thread entry point which takes a single
     
    114125 *  as arguments.
    115126 */
    116 typedef Thread ( *Thread_Entry_both_numeric_first )( uint32_t  , void * );
     127typedef Thread ( *Thread_Entry_both_numeric_first )( Thread_Entry_numeric_type, void * );
    117128
    118129/**
     
    170181typedef struct {
    171182  /** This field is the starting address for the thread. */
    172   Thread_Entry         entry_point;
     183  Thread_Entry                         entry_point;
    173184  /** This field indicates the how task is invoked. */
    174   Thread_Start_types   prototype;
     185  Thread_Start_types                   prototype;
    175186  /** This field is the pointer argument passed at thread start. */
    176   void                *pointer_argument;
     187  void                                *pointer_argument;
    177188  /** This field is the numeric argument passed at thread start. */
    178   uint32_t             numeric_argument;
     189  Thread_Entry_numeric_type            numeric_argument;
    179190  /*-------------- initial execution modes ----------------- */
    180191  /** This field indicates whether the thread was preemptible when
    181192    * it started.
    182193    */
    183   boolean              is_preemptible;
     194  boolean                              is_preemptible;
    184195  /** This field indicates the CPU budget algorith. */
    185   Thread_CPU_budget_algorithms          budget_algorithm;
     196  Thread_CPU_budget_algorithms         budget_algorithm;
    186197  /** This field is the routine to invoke when the CPU allotment is
    187198   *  consumed.
    188199   */
    189   Thread_CPU_budget_algorithm_callout   budget_callout;
     200  Thread_CPU_budget_algorithm_callout  budget_callout;
    190201  /** This field is the initial ISR disable level of this thread. */
    191   uint32_t             isr_level;
     202  uint32_t                             isr_level;
    192203  /** This field is the initial priority. */
    193   Priority_Control     initial_priority;
     204  Priority_Control                     initial_priority;
    194205  /** This field indicates whether the SuperCore allocated the stack. */
    195   boolean              core_allocated_stack;
     206  boolean                              core_allocated_stack;
    196207  /** This field is the stack information. */
    197   Stack_Control        Initial_stack;
     208  Stack_Control                        Initial_stack;
    198209#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
    199210  /** This field is the initial FP context area address. */
    200   Context_Control_fp  *fp_context;
     211  Context_Control_fp                  *fp_context;
    201212#endif
    202213  /** This field is the initial stack area address. */
    203   void                *stack;
    204 }   Thread_Start_information;
     214  void                                *stack;
     215} Thread_Start_information;
    205216
    206217/**
     
    580591 */
    581592boolean _Thread_Start(
    582   Thread_Control           *the_thread,
    583   Thread_Start_types        the_prototype,
    584   void                     *entry_point,
    585   void                     *pointer_argument,
    586   uint32_t                  numeric_argument
     593  Thread_Control            *the_thread,
     594  Thread_Start_types         the_prototype,
     595  void                      *entry_point,
     596  void                      *pointer_argument,
     597  Thread_Entry_numeric_type  numeric_argument
    587598);
    588599
     
    595606 */
    596607boolean _Thread_Restart(
    597   Thread_Control           *the_thread,
    598   void                     *pointer_argument,
    599   uint32_t                  numeric_argument
     608  Thread_Control            *the_thread,
     609  void                      *pointer_argument,
     610  Thread_Entry_numeric_type  numeric_argument
    600611);
    601612
     
    605616 */
    606617void _Thread_Reset(
    607   Thread_Control      *the_thread,
    608   void                *pointer_argument,
    609   uint32_t             numeric_argument
     618  Thread_Control            *the_thread,
     619  void                      *pointer_argument,
     620  Thread_Entry_numeric_type  numeric_argument
    610621);
    611622
  • cpukit/score/src/threadreset.c

    r8ad2468c r3b14b7ad  
    4242
    4343void _Thread_Reset(
    44   Thread_Control      *the_thread,
    45   void                *pointer_argument,
    46   uint32_t             numeric_argument
     44  Thread_Control            *the_thread,
     45  void                      *pointer_argument,
     46  Thread_Entry_numeric_type  numeric_argument
    4747)
    4848{
  • cpukit/score/src/threadrestart.c

    r8ad2468c r3b14b7ad  
    4242
    4343boolean _Thread_Restart(
    44   Thread_Control      *the_thread,
    45   void                *pointer_argument,
    46   uint32_t             numeric_argument
     44  Thread_Control            *the_thread,
     45  void                      *pointer_argument,
     46  Thread_Entry_numeric_type  numeric_argument
    4747)
    4848{
  • cpukit/score/src/threadstart.c

    r8ad2468c r3b14b7ad  
    4242
    4343boolean _Thread_Start(
    44   Thread_Control       *the_thread,
    45   Thread_Start_types    the_prototype,
    46   void                 *entry_point,
    47   void                 *pointer_argument,
    48   uint32_t              numeric_argument
     44  Thread_Control            *the_thread,
     45  Thread_Start_types         the_prototype,
     46  void                      *entry_point,
     47  void                      *pointer_argument,
     48  Thread_Entry_numeric_type  numeric_argument
    4949)
    5050{
Note: See TracChangeset for help on using the changeset viewer.