add-ons/kernel: add casts when calling atomic_*()

Soon GCC is going to be a bit stricter about the type of pointer passed
to atomic_*() functions.

Signed-off-by: Paweł Dziepak <[email protected]>
This commit is contained in:
Paweł Dziepak
2014-08-25 23:02:32 +02:00
parent ae18461ec1
commit 54b314f15f
2 changed files with 2 additions and 2 deletions
@@ -409,7 +409,7 @@ channel_removed(void *cookie)
TRACE("channel_removed()\n");
// disable access instantly
atomic_or(&channel->lost, 1);
atomic_or((int32*)&channel->lost, 1);
}
@@ -545,7 +545,7 @@ motor_off_daemon(void *t, int tim)
for (i = 0; i < MAX_FLOPPIES; i++) {
if (floppies[i].iobase && !floppies[i].pending_cmd && floppies[i].motor_timeout > 0) {
TRACE("floppies[%d].motor_timeout = %ld\n", i, floppies[i].motor_timeout);
if (atomic_add(&floppies[i].motor_timeout, -500000) <= 500000) {
if (atomic_add((int32*)&floppies[i].motor_timeout, -500000) <= 500000) {
dprintf("turning off motor for drive %d\n", floppies[i].drive_num);
turn_off_motor(&floppies[i]);
floppies[i].motor_timeout = 0;