Fix a compilation error in last commits that occure if CONFIG_PRIORITY_INHERITANCE is not selected

This commit is contained in:
Gregory Nutt
2014-10-07 09:07:54 -06:00
parent f956bd9915
commit f575567f55
+4
View File
@@ -91,7 +91,9 @@ FAR struct aio_container_s *aio_contain(FAR struct aiocb *aiocbp)
{ {
FAR struct aio_container_s *aioc; FAR struct aio_container_s *aioc;
FAR struct file *filep; FAR struct file *filep;
#ifdef CONFIG_PRIORITY_INHERITANCE
struct sched_param param; struct sched_param param;
#endif
/* Get the file structure corresponding to the file descriptor. */ /* Get the file structure corresponding to the file descriptor. */
@@ -117,8 +119,10 @@ FAR struct aio_container_s *aio_contain(FAR struct aiocb *aiocbp)
aioc->aioc_filep = filep; aioc->aioc_filep = filep;
aioc->aioc_pid = getpid(); aioc->aioc_pid = getpid();
#ifdef CONFIG_PRIORITY_INHERITANCE
DEBUGVERIFY(sched_getparam (aioc->aioc_pid, &param)); DEBUGVERIFY(sched_getparam (aioc->aioc_pid, &param));
aioc->aioc_prio = param.sched_priority; aioc->aioc_prio = param.sched_priority;
#endif
/* Add the container to the pending transfer list. */ /* Add the container to the pending transfer list. */