kernels/linux-2.4.0/include/asm-s390/semaphore-helper.h
/*
 * waking_non_zero_trylock:
 *	1	failed to lock
 *	0	got the lock
 *
 * Implementation details are the same of the interruptible case.
 */
1       failed to lock
0       got the lock

Implementation details are the same of the interruptible case.
1 failed to lock 0 got the lock Implementation details are the same of the interruptible case .
static inline int waking_non_zero_trylock(struct semaphore *sem)
{
	unsigned long flags;
	int ret = 1;
	spin_lock_irqsave(&semaphore_wake_lock, flags);
	if (sem->waking <= 0)
        {
                if (atomic_inc_and_test_greater_zero(&sem->count))
                        sem->waking--;
        } else {
		sem->waking--;
		ret = 0;
	}
	spin_unlock_irqrestore(&semaphore_wake_lock, flags);
	return ret;
}
static inline int waking_non_zero_trylock ( struct semaphore * sem ) { unsigned long flags ; int ret = 1 ; spin_lock_irqsave ( & semaphore_wake_lock , flags ) ; if ( sem -> waking <= 0 ) { if ( atomic_inc_and_test_greater_zero ( & sem -> count ) ) sem -> waking -- ; } else { sem -> waking -- ; ret = 0 ; } spin_unlock_irqrestore ( & semaphore_wake_lock , flags ) ; return ret ; }
waking_non_zero_trylock:
      1       failed to lock
      0       got the lock
waking_non_zero_trylock : 1 failed to lock 0 got the lock