refactored, reformatted, added missing clobber registers to __asm__

statements
This commit is contained in:
Markus Fröschle
2014-09-02 13:51:00 +00:00
parent 56cbd17373
commit 7921199e9b
21 changed files with 141 additions and 124 deletions

View File

@@ -16,7 +16,7 @@
#define DBG_NIF
#ifdef DBG_NIF
#define dbg(format, arg...) do { xprintf("DEBUG: " format, ##arg); } while (0)
#define dbg(format, arg...) do { xprintf("DEBUG: %s(): " format, __FUNCTION__, ##arg); } while (0)
#else
#define dbg(format, arg...) do { ; } while (0)
#endif /* DBG_NIF */
@@ -56,13 +56,13 @@ void nif_protocol_handler(NIF *nif, uint16_t protocol, NBUF *pNbuf)
{
if (nif->protocol[index].protocol == protocol)
{
dbg("%s: call protocol handler for protocol %d at %p\r\n", __FUNCTION__, protocol,
dbg("call protocol handler for protocol %d at %p\r\n", protocol,
nif->protocol[index].handler);
nif->protocol[index].handler(nif,pNbuf);
return;
}
}
dbg("%s: no protocol handler found for protocol %d\r\n", __FUNCTION__, protocol);
dbg("no protocol handler found for protocol %d\r\n", protocol);
}
void *nif_get_protocol_info(NIF *nif, uint16_t protocol)
@@ -92,7 +92,7 @@ int nif_bind_protocol(NIF *nif, uint16_t protocol, void (*handler)(NIF *,NBUF *)
if (nif->num_protocol < (MAX_SUP_PROTO - 1))
{
nif->protocol[nif->num_protocol].protocol = protocol;
nif->protocol[nif->num_protocol].handler = (void(*)(NIF*,NBUF*))handler;
nif->protocol[nif->num_protocol].handler = (void(*)(NIF *, NBUF *)) handler;
nif->protocol[nif->num_protocol].info = info;
++nif->num_protocol;