Changeset dc747e3 in mainline for generic/src/synch/rwlock.c


Ignore:
Timestamp:
2005-12-15T10:27:59Z (20 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7dd2561
Parents:
3fc03fd
Message:

Add SPINLOCK_DECLARE and SPINLOCK_INITIALIZE macros.
SPINLOCK_DECLARE is to be used instead of direct spinlock_t declarations
in dynamically allocated structures on which spinlock_initialize() is called after
their creation.
SPINLOCK_INITIALIZE is to be used instead of direct spinlock_t declarations
of global spinlocks. It declares and initializes the spinlock.
Moreover, both macros are empty on UP so that -Wall warnings about unused structures
get supressed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • generic/src/synch/rwlock.c

    r3fc03fd rdc747e3  
    193193                 * after this thread is put asleep.
    194194                 */
     195                #ifdef CONFIG_SMP
    195196                thread_register_call_me(release_spinlock, &rwl->lock);
     197                #else
     198                thread_register_call_me(release_spinlock, NULL);
     199                #endif
    196200                                 
    197201                rc = _mutex_lock_timeout(&rwl->exclusive, usec, trylock);
     
    201205                                 * release_spinlock() wasn't called
    202206                                 */
    203                                 thread_register_call_me(NULL, NULL);                             
     207                                thread_register_call_me(NULL, NULL);
    204208                                spinlock_unlock(&rwl->lock);
    205209                        case ESYNCH_TIMEOUT:
Note: See TracChangeset for help on using the changeset viewer.