projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
ea42179
)
[PATCH] Fixup nice() return value and duplicate volatiles
author
Jens Axboe
<axboe@suse.de>
Thu, 13 Jul 2006 17:33:45 +0000
(10:33 -0700)
committer
Jens Axboe
<axboe@suse.de>
Thu, 13 Jul 2006 17:33:45 +0000
(10:33 -0700)
fio.c
patch
|
blob
|
blame
|
history
fio.h
patch
|
blob
|
blame
|
history
diff --git
a/fio.c
b/fio.c
index 412f00295b27f6aff1e190d8b2e0bd37d502133b..3656694b291cf7954abac48815cdeeeeeb801ca4 100644
(file)
--- a/
fio.c
+++ b/
fio.c
@@
-1355,7
+1355,7
@@
static void *thread_main(void *data)
}
}
}
}
- if (nice(td->nice)
< 0
) {
+ if (nice(td->nice)
== -1
) {
td_verror(td, errno);
goto err;
}
td_verror(td, errno);
goto err;
}
diff --git
a/fio.h
b/fio.h
index cc30a15ea189b2bad02a2c64ce5a5af5a3dd85ca..a87fcef472a951a45e174acd5e811628ad789319 100644
(file)
--- a/
fio.h
+++ b/
fio.h
@@
-424,12
+424,12
@@
extern int init_random_state(struct thread_data *);
* Naturally this would not work for any type of contended semaphore or
* for real locking.
*/
* Naturally this would not work for any type of contended semaphore or
* for real locking.
*/
-static inline void fio_sem_init(volatile int
volatile
*sem, int val)
+static inline void fio_sem_init(volatile int *sem, int val)
{
*sem = val;
}
{
*sem = val;
}
-static inline void fio_sem_down(volatile int
volatile
*sem)
+static inline void fio_sem_down(volatile int *sem)
{
while (*sem == 0)
usleep(10000);
{
while (*sem == 0)
usleep(10000);
@@
-437,7
+437,7
@@
static inline void fio_sem_down(volatile int volatile *sem)
(*sem)--;
}
(*sem)--;
}
-static inline void fio_sem_up(volatile int
volatile
*sem)
+static inline void fio_sem_up(volatile int *sem)
{
(*sem)++;
}
{
(*sem)++;
}