Changeset b3a6713 in rtems


Ignore:
Timestamp:
Aug 16, 2001, 9:36:15 PM (20 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Children:
cbdb144
Parents:
5ccb03b
Message:

2001-08-16 Joel Sherrill <joel@…>

  • src/mqueuesendsupp.c: Account for possibly blocking during the core send operation.

2001-08-16 Joel Sherrill <joel@…>

  • src/msgqsubmit.c: Add a comment indicating that we do not have to account for possibly blocking during the core send operation because Classic API message queue send is always non-blocking.

2001-08-16 Joel Sherrill <joel@…>

  • include/rtems/score/coremsg.h, src/coremsgsubmit.c: Add a new return status to account for blocking sends. Otherwise, the caller will think that the returned message status will have the ultimate results of the operation. If the send times out, the final status will be in the return_code of the thread.

2001-08-16 Joel Sherrill <joel@…>

  • src/coremutexsurrender.c: Use holder thread not executing thread because even though they may and often are the same it is not guaranteed unless the proper attribute is set.

2001-08-16 Joel Sherrill <joel@…>

  • startup/linkcmds: Modified to work better with gcc 2.8.1 and gnat 3.13p.

2001-08-16 Joel Sherrill <joel@…>

  • tools/runtest.in: Recognize debug variant of monitor test.

2001-08-16 Joel Sherrill <joel@…>

  • sp13/sp13.scn: Id in screen had wrong class field value.
  • sp13/system.h: Account for message buffer memory.
  • sp13/task2.c: Remove unnecessary check for failure.

2001-08-16 Joel Sherrill <joel@…>

  • sp20/system.h: Account for extra task stacks properly.

2001-08-16 Joel Sherrill <joel@…>

  • include/tmacros.h: Attempt to print errno as further information.
Location:
c/src
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/posix/src/mqueuesendsupp.c

    r5ccb03b rb3a6713  
    8888
    8989      _Thread_Enable_dispatch();
     90
     91      /*
     92       *  If we had to block, then this is where the task returns
     93       *  after it wakes up.  The returned status is correct for
     94       *  non-blocking operations but if we blocked, then we need
     95       *  to look at the status in our TCB.
     96       */
     97
     98      if ( msg_status == CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT )
     99        msg_status = _Thread_Executing->Wait.return_code;
     100
    90101      if ( !msg_status )
    91         return 0;
     102        return msg_status;
    92103
    93104      set_errno_and_return_minus_one(
  • c/src/exec/rtems/src/msgqsubmit.c

    r5ccb03b rb3a6713  
    133133
    134134      _Thread_Enable_dispatch();
     135      /*
     136       *  Since this API does not allow for blocking sends, we can directly
     137       *  return the returned msg_status.
     138       */
     139
    135140      return
    136141        _Message_queue_Translate_core_message_queue_return_code( msg_status );
  • c/src/exec/score/include/rtems/score/coremsg.h

    r5ccb03b rb3a6713  
    9696  CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT,
    9797  CORE_MESSAGE_QUEUE_STATUS_WAS_DELETED,
    98   CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
     98  CORE_MESSAGE_QUEUE_STATUS_TIMEOUT,
     99  CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT
    99100}   CORE_message_queue_Status;
    100101
  • c/src/exec/score/src/coremsgsubmit.c

    r5ccb03b rb3a6713  
    172172  }
    173173
    174   return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
     174  return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
    175175}
  • c/src/exec/score/src/coremutexsurrender.c

    r5ccb03b rb3a6713  
    8787  }
    8888
    89   _Thread_Executing->resource_count--;
     89  holder->resource_count--;
    9090  the_mutex->holder    = NULL;
    9191  the_mutex->holder_id = 0;
  • c/src/lib/libbsp/powerpc/psim/startup/linkcmds

    r5ccb03b rb3a6713  
    6565    *(.gnu.warning)
    6666  } >RAM
    67   .init           : { *(.init)          } >RAM
    68   .fini           : { *(.fini)          } >RAM
     67  .init           : { __init = .; *(.init)              } >RAM
     68  .fini           : { __fini = .; *(.fini)              } >RAM
    6969  .rodata         : { *(.rodata) *(.gnu.linkonce.r*) } >RAM
    7070  .rodata1        : { *(.rodata1)       } >RAM
  • c/src/lib/libbsp/sparc/erc32/tools/runtest.in

    r5ccb03b rb3a6713  
    132132
    133133   case $tname in
    134        monitor)
     134       monitor*)
    135135           if [ $run_to_completion = "yes" ]
    136136           then
  • c/src/tests/sptests/sp13/sp13.scn

    r5ccb03b rb3a6713  
    11*** TEST 13 ***
    2 TA1 - rtems_message_queue_ident - qid => 18010001
     2TA1 - rtems_message_queue_ident - qid => 1c010001
    33TA1 - rtems_message_queue_send - BUFFER 1 TO Q 1
    44TA1 - rtems_message_queue_send - BUFFER 2 TO Q 1
  • c/src/tests/sptests/sp13/system.h

    r5ccb03b rb3a6713  
    5454#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
    5555
     56#define CONFIGURE_MEMORY_OVERHEAD           32
    5657#define CONFIGURE_EXTRA_TASK_STACKS         (3 * RTEMS_MINIMUM_STACK_SIZE)
    5758
  • c/src/tests/sptests/sp13/task2.c

    r5ccb03b rb3a6713  
    101101  Fill_buffer( "BUFFER 2 TO Q 2", (long *)buffer );
    102102  puts( "TA2 - rtems_message_queue_send - BUFFER 2 TO Q 2" );
    103   directive_failed( status, "rtems_message_queue_send" );
    104 
    105103  status = rtems_message_queue_send( Queue_id[ 2 ], buffer, MESSAGE_SIZE );
    106104  directive_failed( status, "rtems_message_queue_send" );
  • c/src/tests/sptests/sp20/system.h

    r5ccb03b rb3a6713  
    4646#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
    4747
    48 #define CONFIGURE_EXTRA_TASK_STACKS         (15 * RTEMS_MINIMUM_STACK_SIZE)
     48#define CONFIGURE_EXTRA_TASK_STACKS         (6 * 3 * RTEMS_MINIMUM_STACK_SIZE)
    4949
    5050#include <confdefs.h>
  • c/src/tests/support/include/tmacros.h

    r5ccb03b rb3a6713  
    9292    check_dispatch_disable_level( _level ); \
    9393    if ( (_stat) != (_desired) ) { \
    94       printf( "\n%s FAILED -- expected (%s) got (%s)\n", \
    95               (_msg), strerror(_desired), strerror(_stat) ); \
     94      printf( "\n%s FAILED -- expected (%d - %s) got (%d - %s)\n", \
     95              (_msg), _desired, strerror(_desired), _stat, strerror(_stat) ); \
     96      printf( "\n FAILED -- errno (%d - %s)\n", \
     97              errno, strerror(errno) ); \
    9698      fflush(stdout); \
    9799      exit( _stat ); \
Note: See TracChangeset for help on using the changeset viewer.