mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Exterminate old-style function definitions
This commit is contained in:
parent
29ca1e0f52
commit
9a9caf2c68
@ -233,7 +233,7 @@ void msp430_init_dco(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
void board_init()
|
||||
void board_init(void)
|
||||
{
|
||||
msp430_cpu_init();
|
||||
msb_ports_init();
|
||||
|
@ -60,7 +60,7 @@ void __attribute__((__no_instrument_function__)) ltc4150_sync_blocking(void)
|
||||
while (!(FIO0PIN & BIT4)) {};
|
||||
}
|
||||
|
||||
void __attribute__((__no_instrument_function__)) ltc4150_arch_init()
|
||||
void __attribute__((__no_instrument_function__)) ltc4150_arch_init(void)
|
||||
{
|
||||
FIO0DIR |= BIT5;
|
||||
FIO0SET = BIT5;
|
||||
|
@ -21,7 +21,7 @@
|
||||
* Nothing to initialize at the moment.
|
||||
* Turns the red LED on and the green LED off.
|
||||
*/
|
||||
void board_init()
|
||||
void board_init(void)
|
||||
{
|
||||
LED_GREEN_OFF;
|
||||
LED_RED_ON;
|
||||
|
@ -138,7 +138,7 @@ int init_tcp_socket(char *tcpport)
|
||||
return s;
|
||||
}
|
||||
|
||||
int init_unix_socket()
|
||||
int init_unix_socket(void)
|
||||
{
|
||||
int s;
|
||||
struct sockaddr_un sa;
|
||||
@ -161,7 +161,7 @@ int init_unix_socket()
|
||||
return s;
|
||||
}
|
||||
|
||||
void handle_uart_in()
|
||||
void handle_uart_in(void)
|
||||
{
|
||||
char buf[42];
|
||||
int nread;
|
||||
@ -198,7 +198,7 @@ void handle_uart_in()
|
||||
thread_yield();
|
||||
}
|
||||
|
||||
void handle_uart_sock()
|
||||
void handle_uart_sock(void)
|
||||
{
|
||||
int s;
|
||||
socklen_t t;
|
||||
@ -226,7 +226,7 @@ void handle_uart_sock()
|
||||
}
|
||||
|
||||
#ifdef MODULE_UART0
|
||||
void _native_handle_uart0_input()
|
||||
void _native_handle_uart0_input(void)
|
||||
{
|
||||
if (FD_ISSET(STDIN_FILENO, &_native_rfds)) {
|
||||
handle_uart_in();
|
||||
|
@ -143,7 +143,8 @@ void msp430_init_dco(void)
|
||||
}
|
||||
}
|
||||
|
||||
void board_init() {
|
||||
void board_init(void)
|
||||
{
|
||||
msp430_cpu_init();
|
||||
msb_ports_init();
|
||||
|
||||
|
@ -57,7 +57,7 @@ static void (*sched_cb) (uint32_t timestamp, uint32_t value) = NULL;
|
||||
schedstat pidlist[MAXTHREADS];
|
||||
#endif
|
||||
|
||||
void sched_run()
|
||||
void sched_run(void)
|
||||
{
|
||||
sched_context_switch_request = 0;
|
||||
|
||||
|
@ -32,12 +32,12 @@
|
||||
#include "hwtimer.h"
|
||||
#include "sched.h"
|
||||
|
||||
inline int thread_getpid()
|
||||
inline int thread_getpid(void)
|
||||
{
|
||||
return active_thread->pid;
|
||||
}
|
||||
|
||||
int thread_getlastpid()
|
||||
int thread_getlastpid(void)
|
||||
{
|
||||
return last_pid;
|
||||
}
|
||||
@ -60,7 +60,7 @@ const char *thread_getname(int pid)
|
||||
return sched_threads[pid]->name;
|
||||
}
|
||||
|
||||
void thread_sleep()
|
||||
void thread_sleep(void)
|
||||
{
|
||||
if (inISR()) {
|
||||
return;
|
||||
|
@ -20,7 +20,7 @@ volatile int __inISR = 0;
|
||||
|
||||
char __isr_stack[MSP430_ISR_STACK_SIZE];
|
||||
|
||||
void thread_yield()
|
||||
void thread_yield(void)
|
||||
{
|
||||
__save_context();
|
||||
|
||||
@ -84,7 +84,7 @@ char *thread_stack_init(void (*task_func)(void), void *stack_start, int stack_si
|
||||
return (char *) stackptr;
|
||||
}
|
||||
|
||||
int inISR()
|
||||
int inISR(void)
|
||||
{
|
||||
return __inISR;
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ void timer_unset(short timer)
|
||||
*ptr = 0;
|
||||
}
|
||||
|
||||
unsigned long hwtimer_arch_now()
|
||||
unsigned long hwtimer_arch_now(void)
|
||||
{
|
||||
return ((uint32_t)timer_round << 16) + TIMER_VAL_REG;
|
||||
}
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include "irq.h"
|
||||
#include "cpu.h"
|
||||
|
||||
unsigned int disableIRQ()
|
||||
unsigned int disableIRQ(void)
|
||||
{
|
||||
unsigned int state;
|
||||
__asm__("mov.w r2,%0" : "=r"(state));
|
||||
@ -35,7 +35,7 @@ unsigned int disableIRQ()
|
||||
return state;
|
||||
}
|
||||
|
||||
unsigned int enableIRQ()
|
||||
unsigned int enableIRQ(void)
|
||||
{
|
||||
unsigned int state;
|
||||
__asm__("mov.w r2,%0" : "=r"(state));
|
||||
|
@ -179,7 +179,7 @@ void schedule_timer(void)
|
||||
*
|
||||
* set new system timer, call timer interrupt handler
|
||||
*/
|
||||
void hwtimer_isr_timer()
|
||||
void hwtimer_isr_timer(void)
|
||||
{
|
||||
DEBUG("hwtimer_isr_timer()\n");
|
||||
|
||||
@ -297,7 +297,7 @@ unsigned long hwtimer_arch_now(void)
|
||||
* Called once on process creation in order to mimic the behaviour a
|
||||
* regular hardware timer.
|
||||
*/
|
||||
void native_hwtimer_pre_init()
|
||||
void native_hwtimer_pre_init(void)
|
||||
{
|
||||
/* initialize time delta */
|
||||
time_null = 0;
|
||||
|
@ -105,7 +105,7 @@ void print_sigmasks(void)
|
||||
}
|
||||
}
|
||||
|
||||
void native_print_signals()
|
||||
void native_print_signals(void)
|
||||
{
|
||||
sigset_t p, q;
|
||||
puts("native signals:\n");
|
||||
@ -253,7 +253,7 @@ int _native_popsig(void)
|
||||
* call signal handlers,
|
||||
* restore user context
|
||||
*/
|
||||
void native_irq_handler()
|
||||
void native_irq_handler(void)
|
||||
{
|
||||
int sig;
|
||||
|
||||
|
@ -43,7 +43,7 @@ void lpm_init(void)
|
||||
return;
|
||||
}
|
||||
|
||||
void _native_lpm_sleep()
|
||||
void _native_lpm_sleep(void)
|
||||
{
|
||||
#ifdef MODULE_UART0
|
||||
int nfds;
|
||||
|
@ -147,7 +147,7 @@ void isr_cpu_switch_context_exit(void)
|
||||
errx(EXIT_FAILURE, "2 this should have never been reached!!");
|
||||
}
|
||||
|
||||
void cpu_switch_context_exit()
|
||||
void cpu_switch_context_exit(void)
|
||||
{
|
||||
#ifdef NATIVE_AUTO_EXIT
|
||||
if (num_tasks <= 1) {
|
||||
@ -174,7 +174,7 @@ void cpu_switch_context_exit()
|
||||
errx(EXIT_FAILURE, "3 this should have never been reached!!");
|
||||
}
|
||||
|
||||
void isr_thread_yield()
|
||||
void isr_thread_yield(void)
|
||||
{
|
||||
DEBUG("isr_thread_yield()\n");
|
||||
|
||||
@ -189,7 +189,7 @@ void isr_thread_yield()
|
||||
}
|
||||
}
|
||||
|
||||
void thread_yield()
|
||||
void thread_yield(void)
|
||||
{
|
||||
ucontext_t *ctx = (ucontext_t *)(active_thread->sp);
|
||||
if (_native_in_isr == 0) {
|
||||
@ -209,7 +209,7 @@ void thread_yield()
|
||||
}
|
||||
}
|
||||
|
||||
void native_cpu_init()
|
||||
void native_cpu_init(void)
|
||||
{
|
||||
if (getcontext(&end_context) == -1) {
|
||||
err(EXIT_FAILURE, "end_context(): getcontext()");
|
||||
|
@ -63,7 +63,7 @@ void nativenet_init(int transceiver_pid)
|
||||
_native_net_tpid = transceiver_pid;
|
||||
}
|
||||
|
||||
void nativenet_powerdown()
|
||||
void nativenet_powerdown(void)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -80,7 +80,7 @@ int16_t nativenet_set_channel(uint8_t channel)
|
||||
return _native_net_chan;
|
||||
}
|
||||
|
||||
int16_t nativenet_get_channel()
|
||||
int16_t nativenet_get_channel(void)
|
||||
{
|
||||
return _native_net_chan;
|
||||
}
|
||||
@ -91,7 +91,7 @@ uint16_t nativenet_set_pan(uint16_t pan)
|
||||
return _native_net_pan;
|
||||
}
|
||||
|
||||
uint16_t nativenet_get_pan()
|
||||
uint16_t nativenet_get_pan(void)
|
||||
{
|
||||
return _native_net_pan;
|
||||
}
|
||||
@ -103,7 +103,7 @@ radio_address_t nativenet_set_address(radio_address_t address)
|
||||
return _native_net_addr;
|
||||
}
|
||||
|
||||
radio_address_t nativenet_get_address()
|
||||
radio_address_t nativenet_get_address(void)
|
||||
{
|
||||
DEBUG("nativenet_get_address -> address = %d\n", _native_net_addr);
|
||||
return _native_net_addr;
|
||||
@ -131,7 +131,7 @@ int8_t nativenet_send(radio_packet_t *packet)
|
||||
return send_buf(packet);
|
||||
}
|
||||
|
||||
void nativenet_switch_to_rx()
|
||||
void nativenet_switch_to_rx(void)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -134,7 +134,7 @@ void _native_log_stderr(char *stderrtype)
|
||||
}
|
||||
}
|
||||
|
||||
void daemonize()
|
||||
void daemonize(void)
|
||||
{
|
||||
pid_t pid;
|
||||
|
||||
@ -148,7 +148,7 @@ void daemonize()
|
||||
}
|
||||
}
|
||||
|
||||
void usage_exit()
|
||||
void usage_exit(void)
|
||||
{
|
||||
real_printf("usage: %s", _progname);
|
||||
|
||||
|
@ -55,7 +55,7 @@ void (*real_free)(void *ptr);
|
||||
void* (*real_calloc)(size_t nmemb, size_t size);
|
||||
void* (*real_realloc)(void *ptr, size_t size);
|
||||
|
||||
void _native_syscall_enter()
|
||||
void _native_syscall_enter(void)
|
||||
{
|
||||
_native_in_syscall++;
|
||||
#if LOCAL_DEBUG
|
||||
@ -63,7 +63,7 @@ void _native_syscall_enter()
|
||||
#endif
|
||||
}
|
||||
|
||||
void _native_syscall_leave()
|
||||
void _native_syscall_leave(void)
|
||||
{
|
||||
#if LOCAL_DEBUG
|
||||
real_write(STDERR_FILENO, "< _native_in_syscall\n", 21);
|
||||
|
@ -153,7 +153,7 @@ cc1100_statistic_t cc1100_statistic;
|
||||
// Initialization of physical layer
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
void cc1100_phy_init()
|
||||
void cc1100_phy_init(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -121,7 +121,7 @@ uint8_t cc110x_get_buffer_pos(void)
|
||||
return (rx_buffer_next - 1);
|
||||
}
|
||||
|
||||
radio_address_t cc110x_get_address()
|
||||
radio_address_t cc110x_get_address(void)
|
||||
{
|
||||
return radio_address;
|
||||
}
|
||||
|
@ -1542,7 +1542,7 @@ void lowpan_iphc_decoding(uint8_t *data, uint8_t length, net_if_eui64_t *s_addr,
|
||||
packet_length = IPV6_HDR_LEN + ipv6_buf->length;
|
||||
}
|
||||
|
||||
uint8_t lowpan_context_len()
|
||||
uint8_t lowpan_context_len(void)
|
||||
{
|
||||
return context_len;
|
||||
}
|
||||
@ -1596,7 +1596,7 @@ lowpan_context_t *lowpan_context_update(uint8_t num, const ipv6_addr_t *prefix,
|
||||
return context;
|
||||
}
|
||||
|
||||
lowpan_context_t *lowpan_context_get()
|
||||
lowpan_context_t *lowpan_context_get(void)
|
||||
{
|
||||
return contexts;
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ rpl_instance_t *rpl_get_instance(uint8_t instanceid)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
rpl_instance_t *rpl_get_my_instance()
|
||||
rpl_instance_t *rpl_get_my_instance(void)
|
||||
{
|
||||
for (int i = 0; i < RPL_MAX_INSTANCES; i++) {
|
||||
if (instances[i].joined) {
|
||||
@ -115,7 +115,7 @@ rpl_dodag_t *rpl_get_dodag(ipv6_addr_t *id)
|
||||
|
||||
return NULL;
|
||||
}
|
||||
rpl_dodag_t *rpl_get_my_dodag()
|
||||
rpl_dodag_t *rpl_get_my_dodag(void)
|
||||
{
|
||||
for (int i = 0; i < RPL_MAX_DODAGS; i++) {
|
||||
if (dodags[i].joined) {
|
||||
@ -416,7 +416,7 @@ void rpl_local_repair(void)
|
||||
|
||||
}
|
||||
|
||||
ipv6_addr_t *rpl_get_my_preferred_parent()
|
||||
ipv6_addr_t *rpl_get_my_preferred_parent(void)
|
||||
{
|
||||
rpl_dodag_t *my_dodag = rpl_get_my_dodag();
|
||||
|
||||
|
@ -217,7 +217,7 @@ void dao_delay_over(void)
|
||||
}
|
||||
}
|
||||
|
||||
void dao_ack_received()
|
||||
void dao_ack_received(void)
|
||||
{
|
||||
ack_received = true;
|
||||
long_delay_dao();
|
||||
|
@ -287,7 +287,7 @@ void vtimer_get_localtime(struct tm *localt)
|
||||
// TODO: fill the other fields
|
||||
}
|
||||
|
||||
int vtimer_init()
|
||||
int vtimer_init(void)
|
||||
{
|
||||
DEBUG("vtimer_init().\n");
|
||||
int state = disableIRQ();
|
||||
|
Loading…
Reference in New Issue
Block a user