ret = down_timeout(&rlun->wr_sem, msecs_to_jiffies(3));
- if (ret) {
- switch (ret) {
- case -ETIME:
- pr_err("pblk: lun semaphore timed out\n");
- break;
- case -EINTR:
-
endif
ret = down_timeout(&rlun->wr_sem, msecs_to_jiffies(3));
- if (ret) {
- switch (ret) {
- case -ETIME:
- pr_err("pblk: lun semaphore timed out\n");
- break;
- case -EINTR:
-
uct
> ppa_addr *ppa_list,
> #endif
>
> ret = down_timeout(&rlun->wr_sem, msecs_to_jiffies(3));
> - if (ret) {
> - switch (ret) {
> - case -ETIME:
> - pr_err("pblk: lun semaphore timed out\n");
> -
index b92eabc..74ddb30 100644
--- a/drivers/lightnvm/pblk-core.c
+++ b/drivers/lightnvm/pblk-core.c
@@ -1734,16 +1734,8 @@ static void __pblk_down_page(struct pblk *pblk, struct
ppa_addr *ppa_list,
#endif
ret = down_timeout(&rlun->wr_sem, msecs_to_jiffies(3));
-
Chris Friesen wrote:
static inline int down_timeout(struct semaphore * sem, unsigned int
timeout)
{
int ret = down_trylock(sem);
if (!ret)
ret = __down_timeout(sem, timeout);
return ret;
}
Sorry, I think that should be:
static inline int down_timeout(struct semaphore
There has been some discussion on lkml about a function that would
either down a semaphore or else abort if it couldn't get the semaphore
in a certain amount of time. Something along the lines of:
down_timeout(struct semaphore *sem, long timeout);
Does something like this exist?
Re: down_timeout
On Wed, Apr 25, 2001 at 04:21:22PM -0700, Grover, Andrew
wrote:
> It seems like we need to implement down_timeout (and
> down_timeout_interruptible) to fully flesh out the
semaphore implementation.
>
On Wed, Apr 25, 2001 at 04:21:22PM -0700, Grover, Andrew wrote:
> It seems like we need to implement down_timeout (and
> down_timeout_interruptible) to fully flesh out the semaphore implementation.
> It is difficult and inefficient to emulate this using wrapper functions, as
> far
It seems like we need to implement down_timeout (and
down_timeout_interruptible) to fully flesh out the semaphore implementation.
It is difficult and inefficient to emulate this using wrapper functions, as
far as I can see.
Seems like this is a fairly standard interface to have for OS semaphores
9 matches
Mail list logo