Changeset 2b454fa in rtems


Ignore:
Timestamp:
Apr 26, 2002, 11:56:56 PM (18 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
bf99393f
Parents:
7ae7cf7
Message:

2001-04-26 Joel Sherrill <joel@…>

  • include/rtems/score/object.h, inline/rtems/score/object.inl, src/objectcomparenamestring.c: Address PR81 that reworked POSIX message queues to add a descriptor separate from the underlying message queue. This allows non-blocking to follow the "open" not the underlying queue. As part of debugging this it became clear that _Objects_Compare_name_string was broken and a simple version using strncmp() was substituted.
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/score/ChangeLog

    r7ae7cf7 r2b454fa  
     12001-04-26      Joel Sherrill <joel@OARcorp.com>
     2
     3        * include/rtems/score/object.h, inline/rtems/score/object.inl,
     4        src/objectcomparenamestring.c: Address PR81 that
     5        reworked POSIX message queues to add a descriptor separate from
     6        the underlying message queue.  This allows non-blocking to follow
     7        the "open" not the underlying queue.   As part of debugging this
     8        it became clear that _Objects_Compare_name_string was broken
     9        and a simple version using strncmp() was substituted.
     10 
    1112002-04-18      Ralf Corsepius <corsepiu@faw.uni-ulm.de>
    212
  • c/src/exec/score/include/rtems/score/object.h

    r7ae7cf7 r2b454fa  
    66 *  ids.
    77 *
    8  *  COPYRIGHT (c) 1989-1999.
     8 *  COPYRIGHT (c) 1989-2002.
    99 *  On-Line Applications Research Corporation (OAR).
    1010 *
     
    100100  OBJECTS_POSIX_KEYS                  = 13,
    101101  OBJECTS_POSIX_INTERRUPTS            = 14,
    102   OBJECTS_POSIX_MESSAGE_QUEUES        = 15,
    103   OBJECTS_POSIX_MUTEXES               = 16,
    104   OBJECTS_POSIX_SEMAPHORES            = 17,
    105   OBJECTS_POSIX_CONDITION_VARIABLES   = 18,
    106   OBJECTS_ITRON_EVENTFLAGS            = 19,
    107   OBJECTS_ITRON_MAILBOXES             = 20,
    108   OBJECTS_ITRON_MESSAGE_BUFFERS       = 21,
    109   OBJECTS_ITRON_PORTS                 = 22,
    110   OBJECTS_ITRON_SEMAPHORES            = 23,
    111   OBJECTS_ITRON_VARIABLE_MEMORY_POOLS = 24,
    112   OBJECTS_ITRON_FIXED_MEMORY_POOLS    = 25
     102  OBJECTS_POSIX_MESSAGE_QUEUE_FDS     = 15,
     103  OBJECTS_POSIX_MESSAGE_QUEUES        = 16,
     104  OBJECTS_POSIX_MUTEXES               = 17,
     105  OBJECTS_POSIX_SEMAPHORES            = 18,
     106  OBJECTS_POSIX_CONDITION_VARIABLES   = 19,
     107  OBJECTS_ITRON_EVENTFLAGS            = 10,
     108  OBJECTS_ITRON_MAILBOXES             = 21,
     109  OBJECTS_ITRON_MESSAGE_BUFFERS       = 22,
     110  OBJECTS_ITRON_PORTS                 = 23,
     111  OBJECTS_ITRON_SEMAPHORES            = 24,
     112  OBJECTS_ITRON_VARIABLE_MEMORY_POOLS = 25,
     113  OBJECTS_ITRON_FIXED_MEMORY_POOLS    = 26
    113114} Objects_Classes;
    114115 
  • c/src/exec/score/inline/rtems/score/object.inl

    r7ae7cf7 r2b454fa  
    243243
    244244  if ( information->is_string )
    245     _Objects_Copy_name_string( name, the_object->name );
     245    /* _Objects_Copy_name_string( name, the_object->name ); */
     246    the_object->name = name;
    246247  else
    247248    _Objects_Copy_name_raw( name, the_object->name, information->name_length );
     
    267268  index = _Objects_Get_index( the_object->id );
    268269  _Objects_Set_local_object( information, index, NULL );
    269   _Objects_Clear_name( the_object->name, information->name_length );
     270  /* _Objects_Clear_name( the_object->name, information->name_length ); */
     271  the_object->name = 0;
    270272}
    271273
     
    284286)
    285287{
    286   _Objects_Clear_name( the_object->name, information->name_length );
     288  /* _Objects_Clear_name( the_object->name, information->name_length ); */
     289  the_object->name = 0;
    287290}
    288291
  • c/src/exec/score/src/objectcomparenamestring.c

    r7ae7cf7 r2b454fa  
    33 *
    44 *
    5  *  COPYRIGHT (c) 1989-1999.
     5 *  COPYRIGHT (c) 1989-2002.
    66 *  On-Line Applications Research Corporation (OAR).
    77 *
     
    2929 *  _Objects_Compare_name_string
    3030 *
    31  *  XXX
     31 * This routine compares the name of an object with the specified string.
     32 *
     33 * Input parameters:
     34 *   name_1 - one name
     35 *   name_2 - other name
     36 *   length - maximum length to compare
     37 *
     38 * Output parameters:
     39 *   returns  - TRUE on a match
    3240 */
    3341 
     
    3846)
    3947{
    40   unsigned8 *name_1_p = (unsigned8 *) name_1;
    41   unsigned8 *name_2_p = (unsigned8 *) name_2;
    42   unsigned32 tmp_length = length;
    43  
    44   do {
    45     if ( *name_1_p++ != *name_2_p++ )
    46       return FALSE;
    47     if ( !tmp_length-- )
    48       return FALSE;
    49   } while ( *name_1_p );
    50 
    51   return TRUE;
     48  if ( !strncmp( name_1_p, name_2_p, length ) )
     49    return TRUE;
     50  return FALSE;
    5251}
  • cpukit/score/ChangeLog

    r7ae7cf7 r2b454fa  
     12001-04-26      Joel Sherrill <joel@OARcorp.com>
     2
     3        * include/rtems/score/object.h, inline/rtems/score/object.inl,
     4        src/objectcomparenamestring.c: Address PR81 that
     5        reworked POSIX message queues to add a descriptor separate from
     6        the underlying message queue.  This allows non-blocking to follow
     7        the "open" not the underlying queue.   As part of debugging this
     8        it became clear that _Objects_Compare_name_string was broken
     9        and a simple version using strncmp() was substituted.
     10 
    1112002-04-18      Ralf Corsepius <corsepiu@faw.uni-ulm.de>
    212
  • cpukit/score/include/rtems/score/object.h

    r7ae7cf7 r2b454fa  
    66 *  ids.
    77 *
    8  *  COPYRIGHT (c) 1989-1999.
     8 *  COPYRIGHT (c) 1989-2002.
    99 *  On-Line Applications Research Corporation (OAR).
    1010 *
     
    100100  OBJECTS_POSIX_KEYS                  = 13,
    101101  OBJECTS_POSIX_INTERRUPTS            = 14,
    102   OBJECTS_POSIX_MESSAGE_QUEUES        = 15,
    103   OBJECTS_POSIX_MUTEXES               = 16,
    104   OBJECTS_POSIX_SEMAPHORES            = 17,
    105   OBJECTS_POSIX_CONDITION_VARIABLES   = 18,
    106   OBJECTS_ITRON_EVENTFLAGS            = 19,
    107   OBJECTS_ITRON_MAILBOXES             = 20,
    108   OBJECTS_ITRON_MESSAGE_BUFFERS       = 21,
    109   OBJECTS_ITRON_PORTS                 = 22,
    110   OBJECTS_ITRON_SEMAPHORES            = 23,
    111   OBJECTS_ITRON_VARIABLE_MEMORY_POOLS = 24,
    112   OBJECTS_ITRON_FIXED_MEMORY_POOLS    = 25
     102  OBJECTS_POSIX_MESSAGE_QUEUE_FDS     = 15,
     103  OBJECTS_POSIX_MESSAGE_QUEUES        = 16,
     104  OBJECTS_POSIX_MUTEXES               = 17,
     105  OBJECTS_POSIX_SEMAPHORES            = 18,
     106  OBJECTS_POSIX_CONDITION_VARIABLES   = 19,
     107  OBJECTS_ITRON_EVENTFLAGS            = 10,
     108  OBJECTS_ITRON_MAILBOXES             = 21,
     109  OBJECTS_ITRON_MESSAGE_BUFFERS       = 22,
     110  OBJECTS_ITRON_PORTS                 = 23,
     111  OBJECTS_ITRON_SEMAPHORES            = 24,
     112  OBJECTS_ITRON_VARIABLE_MEMORY_POOLS = 25,
     113  OBJECTS_ITRON_FIXED_MEMORY_POOLS    = 26
    113114} Objects_Classes;
    114115 
  • cpukit/score/inline/rtems/score/object.inl

    r7ae7cf7 r2b454fa  
    243243
    244244  if ( information->is_string )
    245     _Objects_Copy_name_string( name, the_object->name );
     245    /* _Objects_Copy_name_string( name, the_object->name ); */
     246    the_object->name = name;
    246247  else
    247248    _Objects_Copy_name_raw( name, the_object->name, information->name_length );
     
    267268  index = _Objects_Get_index( the_object->id );
    268269  _Objects_Set_local_object( information, index, NULL );
    269   _Objects_Clear_name( the_object->name, information->name_length );
     270  /* _Objects_Clear_name( the_object->name, information->name_length ); */
     271  the_object->name = 0;
    270272}
    271273
     
    284286)
    285287{
    286   _Objects_Clear_name( the_object->name, information->name_length );
     288  /* _Objects_Clear_name( the_object->name, information->name_length ); */
     289  the_object->name = 0;
    287290}
    288291
  • cpukit/score/src/objectcomparenamestring.c

    r7ae7cf7 r2b454fa  
    33 *
    44 *
    5  *  COPYRIGHT (c) 1989-1999.
     5 *  COPYRIGHT (c) 1989-2002.
    66 *  On-Line Applications Research Corporation (OAR).
    77 *
     
    2929 *  _Objects_Compare_name_string
    3030 *
    31  *  XXX
     31 * This routine compares the name of an object with the specified string.
     32 *
     33 * Input parameters:
     34 *   name_1 - one name
     35 *   name_2 - other name
     36 *   length - maximum length to compare
     37 *
     38 * Output parameters:
     39 *   returns  - TRUE on a match
    3240 */
    3341 
     
    3846)
    3947{
    40   unsigned8 *name_1_p = (unsigned8 *) name_1;
    41   unsigned8 *name_2_p = (unsigned8 *) name_2;
    42   unsigned32 tmp_length = length;
    43  
    44   do {
    45     if ( *name_1_p++ != *name_2_p++ )
    46       return FALSE;
    47     if ( !tmp_length-- )
    48       return FALSE;
    49   } while ( *name_1_p );
    50 
    51   return TRUE;
     48  if ( !strncmp( name_1_p, name_2_p, length ) )
     49    return TRUE;
     50  return FALSE;
    5251}
Note: See TracChangeset for help on using the changeset viewer.