[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [task #10139] Prefer statically allocated memory
From: |
Simon Goldschmidt |
Subject: |
[lwip-devel] [task #10139] Prefer statically allocated memory |
Date: |
Tue, 09 Feb 2010 21:55:12 +0000 |
User-agent: |
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; de; rv:1.9.2) Gecko/20100115 Firefox/3.6 |
Follow-up Comment #1, task #10139 (project lwip):
This is the last call for objections before I change semaphore and mbox
functions to take pointers and the _new() functions returning err_t instead of
sys_sem/mbox_t:
err_t sys_sem_new(sys_sem_t *sem, u8_t count);
void sys_sem_signal(sys_sem_t *sem);
u32_t sys_arch_sem_wait(sys_sem_t *sem, u32_t timeout);
void sys_sem_free(sys_sem_t *sem);
err_t sys_mbox_new(sys_mbox_t *mbox, int size);
void sys_mbox_post(sys_mbox_t *mbox, void *msg);
err_t sys_mbox_trypost(sys_mbox_t *mbox, void *msg);
u32_t sys_arch_mbox_fetch(sys_mbox_t *mbox, void **msg, u32_t timeout);
This essentially allows allocating semaphores/mboxes statically or even on
the stack. It breaks ports but is *much* more targeted on embedded OSes than
the current implementation.
And if I'm not mistaken, this idea is supported by one (more or less) active
developer (besides me) already (see
https://savannah.nongnu.org/task/?7212#comment4).
I'll do the change this week (hopefully some tim tomorrow) if noone objects.
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/task/?10139>
_______________________________________________
Nachricht geschickt von/durch Savannah
http://savannah.nongnu.org/