summaryrefslogtreecommitdiffstats
path: root/uisimulator/sdl
diff options
context:
space:
mode:
Diffstat (limited to 'uisimulator/sdl')
-rw-r--r--uisimulator/sdl/button.c14
-rw-r--r--uisimulator/sdl/kernel.c19
2 files changed, 17 insertions, 16 deletions
diff --git a/uisimulator/sdl/button.c b/uisimulator/sdl/button.c
index 777c9d1b95..6931d13fe5 100644
--- a/uisimulator/sdl/button.c
+++ b/uisimulator/sdl/button.c
@@ -481,17 +481,17 @@ void button_event(int key, bool pressed)
#ifdef HAVE_REMOTE_LCD
if(diff & BUTTON_REMOTE)
if(!skip_remote_release)
- queue_post(&button_queue, BUTTON_REL | diff, NULL);
+ queue_post(&button_queue, BUTTON_REL | diff, 0);
else
skip_remote_release = false;
else
#endif
if(!skip_release)
- queue_post(&button_queue, BUTTON_REL | diff, NULL);
+ queue_post(&button_queue, BUTTON_REL | diff, 0);
else
skip_release = false;
#else
- queue_post(&button_queue, BUTTON_REL | diff, NULL);
+ queue_post(&button_queue, BUTTON_REL | diff, 0);
#endif
}
@@ -543,7 +543,7 @@ void button_event(int key, bool pressed)
{
if (queue_empty(&button_queue))
{
- queue_post(&button_queue, BUTTON_REPEAT | btn, NULL);
+ queue_post(&button_queue, BUTTON_REPEAT | btn, 0);
#ifdef CONFIG_BACKLIGHT
#ifdef HAVE_REMOTE_LCD
if(btn & BUTTON_REMOTE)
@@ -565,18 +565,18 @@ void button_event(int key, bool pressed)
#ifdef HAVE_REMOTE_LCD
if (btn & BUTTON_REMOTE) {
if (!remote_filter_first_keypress || is_remote_backlight_on())
- queue_post(&button_queue, btn, NULL);
+ queue_post(&button_queue, btn, 0);
else
skip_remote_release = true;
}
else
#endif
if (!filter_first_keypress || is_backlight_on())
- queue_post(&button_queue, btn, NULL);
+ queue_post(&button_queue, btn, 0);
else
skip_release = true;
#else /* no backlight, nothing to skip */
- queue_post(&button_queue, btn, NULL);
+ queue_post(&button_queue, btn, 0);
#endif
post = false;
}
diff --git a/uisimulator/sdl/kernel.c b/uisimulator/sdl/kernel.c
index fa573a3cc9..dddfa70066 100644
--- a/uisimulator/sdl/kernel.c
+++ b/uisimulator/sdl/kernel.c
@@ -53,7 +53,8 @@ static void queue_fetch_sender(struct queue_sender_list *send,
/* Puts the specified return value in the waiting thread's return value
and wakes the thread - a sender should be confirmed to exist first */
-static void queue_release_sender(struct queue_sender **sender, void *retval)
+static void queue_release_sender(struct queue_sender **sender,
+ intptr_t retval)
{
(*sender)->retval = retval;
*sender = NULL;
@@ -72,7 +73,7 @@ static void queue_release_all_senders(struct event_queue *q)
&q->send->senders[i & QUEUE_LENGTH_MASK];
if(*spp)
{
- queue_release_sender(spp, NULL);
+ queue_release_sender(spp, 0);
}
}
}
@@ -154,7 +155,7 @@ void queue_wait_w_tmo(struct event_queue *q, struct event *ev, int ticks)
}
}
-void queue_post(struct event_queue *q, long id, void *data)
+void queue_post(struct event_queue *q, long id, intptr_t data)
{
int oldlevel = set_irq_level(15<<4);
unsigned int wr = q->write++ & QUEUE_LENGTH_MASK;
@@ -170,7 +171,7 @@ void queue_post(struct event_queue *q, long id, void *data)
if(*spp)
{
/* overflow protect - unblock any thread waiting at this index */
- queue_release_sender(spp, NULL);
+ queue_release_sender(spp, 0);
}
}
#endif
@@ -179,7 +180,7 @@ void queue_post(struct event_queue *q, long id, void *data)
}
#ifdef HAVE_EXTENDED_MESSAGING_AND_NAME
-void * queue_send(struct event_queue *q, long id, void *data)
+intptr_t queue_send(struct event_queue *q, long id, intptr_t data)
{
int oldlevel = set_irq_level(15<<4);
unsigned int wr = q->write++ & QUEUE_LENGTH_MASK;
@@ -195,7 +196,7 @@ void * queue_send(struct event_queue *q, long id, void *data)
if(*spp)
{
/* overflow protect - unblock any thread waiting at this index */
- queue_release_sender(spp, NULL);
+ queue_release_sender(spp, 0);
}
*spp = &sender;
@@ -211,7 +212,7 @@ void * queue_send(struct event_queue *q, long id, void *data)
/* Function as queue_post if sending is not enabled */
set_irq_level(oldlevel);
- return NULL;
+ return 0;
}
#if 0 /* not used now but probably will be later */
@@ -223,7 +224,7 @@ bool queue_in_queue_send(struct event_queue *q)
#endif
/* Replies with retval to any dequeued message sent with queue_send */
-void queue_reply(struct event_queue *q, void *retval)
+void queue_reply(struct event_queue *q, intptr_t retval)
{
if(q->send && q->send->curr_sender)
{
@@ -270,7 +271,7 @@ void queue_remove_from_head(struct event_queue *q, long id)
if(*spp)
{
/* Release any thread waiting on this message */
- queue_release_sender(spp, NULL);
+ queue_release_sender(spp, 0);
}
}
#endif