CS计算机代考程序代写 exam1

exam1

Name: 14

Part of the Linux Kernel Synchronization API
Tear off this page, but return it with your exam.

void spin lock (spinlock t* lock);

void spin lock irq (spinlock t* lock);

void spin lock irqsave (spinlock t* lock, unsigned long& flags);

void spin unlock (spinlock t* lock);

void spin unlock irq (spinlock t* lock);

void spin unlock irqrestore (spinlock t* lock, unsigned long flags);

void down (struct semaphore* sem);

void up (struct semaphore* sem);

void read lock (rwlock t* rw);

void read lock irq (rwlock t* rw);

void read lock irqsave (rwlock t* rw, unsigned long& flags);

void read unlock (rwlock t* rw);

void read unlock irq (rwlock t* rw);

void read unlock irqrestore (rwlock t* rw, unsigned long flags);

void write lock (rwlock t* rw);

void write lock irq (rwlock t* rw);

void write lock irqsave (rwlock t* rw, unsigned long& flags);

void write unlock (rwlock t* rw);

void write unlock irq (rwlock t* rw);

void write unlock irqrestore (rwlock t* rw, unsigned long flags);

void down read (struct rw semaphore* sem);

void down write (struct rw semaphore* sem);

void up read (struct rw semaphore* sem);

void up write (struct rw semaphore* sem);