kernels/linux-2.4.0/include/asm-sh/semaphore.h
/* releasing the writer is easy -- just release it and
 * wake up any sleepers.
 */
releasing the writer is easy -- just release it and
wake up any sleepers.
releasing the writer is easy -- just release it and wake up any sleepers .
extern inline void __up_write(struct rw_semaphore *sem)
{
	int saved = atomic_read(&sem->count), new;
	new = atomic_add_return(RW_LOCK_BIAS, &sem->count);
	if (saved < 0 && new >= 0)
		__rwsem_wake(sem);
}
extern inline void __up_write ( struct rw_semaphore * sem ) { int saved = atomic_read ( & sem -> count ) , new ; new = atomic_add_return ( RW_LOCK_BIAS , & sem -> count ) ; if ( saved < 0 && new >= 0 ) __rwsem_wake ( sem ) ; }
releasing the writer is easy -- just release it and
 wake up any sleepers.
releasing the writer is easy -- just release it and wake up any sleepers .