From: Thomas Veerman Date: Tue, 25 Oct 2011 12:12:20 +0000 (+0000) Subject: err_code has to be preserved as well. Short term fix X-Git-Tag: v3.2.0~287 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zpipe.c?a=commitdiff_plain;h=9e21d55e37850c807be11ccbfad3387a3232f74d;p=minix.git err_code has to be preserved as well. Short term fix --- diff --git a/servers/avfs/job.h b/servers/avfs/job.h index bfcdc5b9e..046a11b30 100644 --- a/servers/avfs/job.h +++ b/servers/avfs/job.h @@ -4,6 +4,7 @@ struct job { struct fproc *j_fp; message j_m_in; + int j_err_code; void *(*j_func)(void *arg); struct job *j_next; }; diff --git a/servers/avfs/worker.c b/servers/avfs/worker.c index b83a044d3..01ce6705b 100644 --- a/servers/avfs/worker.c +++ b/servers/avfs/worker.c @@ -187,6 +187,7 @@ PRIVATE void append_job(struct job *job, void *(*func)(void *arg)) new_job->j_m_in = m_in; new_job->j_func = func; new_job->j_next = NULL; + new_job->j_err_code = OK; /* Append to queue */ tail = job; @@ -216,6 +217,7 @@ PUBLIC void worker_start(void *(*func)(void *arg)) worker->w_job.j_m_in = m_in; worker->w_job.j_func = func; worker->w_job.j_next = NULL; + worker->w_job.j_err_code = OK; worker_wake(worker); return; } @@ -232,6 +234,7 @@ PUBLIC void worker_start(void *(*func)(void *arg)) fp->fp_job.j_m_in = m_in; fp->fp_job.j_func = func; fp->fp_job.j_next = NULL; + fp->fp_job.j_err_code = OK; fp->fp_flags |= FP_PENDING; pending++; } @@ -271,11 +274,13 @@ PUBLIC void worker_wait(void) worker = worker_self(); worker->w_job.j_m_in = m_in; /* Store important global data */ + worker->w_job.j_err_code = err_code; assert(fp == worker->w_job.j_fp); worker_sleep(worker); /* We continue here after waking up */ fp = worker->w_job.j_fp; /* Restore global data */ m_in = worker->w_job.j_m_in; + err_code = worker->w_job.j_err_code; assert(worker->w_next == NULL); }