summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2011-05-12 13:16:31 +0300
committerAlon Levy <alevy@redhat.com>2011-08-26 16:22:11 +0300
commitc0c64cac326de2e4855b08dc21d91b99b59acf41 (patch)
tree11aa17997a22043fbdfdfacbd841443835dd9bf0 /src
parent25036820ffd594bd5da4fe3586c463ab6e2ff8eb (diff)
gallium/drivers/remote: add static's and (void)
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/remote/remote_comms.c24
-rw-r--r--src/gallium/drivers/remote/remote_comms.h2
-rw-r--r--src/gallium/drivers/remote/remote_debug.h2
3 files changed, 15 insertions, 13 deletions
diff --git a/src/gallium/drivers/remote/remote_comms.c b/src/gallium/drivers/remote/remote_comms.c
index aaa100d703..fb788c328f 100644
--- a/src/gallium/drivers/remote/remote_comms.c
+++ b/src/gallium/drivers/remote/remote_comms.c
@@ -27,7 +27,7 @@ extern int analyse_waits;
void check_for_asynchronous_failures(void);
void wait_for_synchronous_message(void);
-int drain_events(int fd) {
+static int drain_events(int fd) {
int flags = fcntl(fd, F_GETFL);
@@ -53,7 +53,7 @@ int drain_events(int fd) {
}
-int wait_for_char(int fd, char c) {
+static int wait_for_char(int fd, char c) {
char received = c + 1;
@@ -74,14 +74,14 @@ int wait_for_char(int fd, char c) {
}
-int wait_for_tx_not_full() {
+static int wait_for_tx_not_full() {
DBG("Waiting for an event on the transmit ring\n");
return wait_for_char(singleton_screen->socketfd, 'T');
}
-int wait_for_rx_not_empty() {
+static int wait_for_rx_not_empty() {
DBG("Waiting for an event on the read-ring\n");
return wait_for_char(singleton_screen->socketfd, 'R');
@@ -129,7 +129,7 @@ void* allocate_message_memory(size_t bytes) {
}
-void debug_print_bytes(char* bytes, int n) {
+static void debug_print_bytes(char* bytes, int n) {
for(int i = 0; i < n; i++) {
printf("%x ", (unsigned int)(bytes[i]));
@@ -141,7 +141,7 @@ void debug_print_bytes(char* bytes, int n) {
}
-int sendsome(uint32_t* readoff, uint32_t* writeoff, uint32_t bufsize, char* writebuf, char* data, int length) {
+static int sendsome(uint32_t* readoff, uint32_t* writeoff, uint32_t bufsize, char* writebuf, char* data, int length) {
uint32_t base = *writeoff;
uint32_t limit = *readoff;
@@ -282,7 +282,7 @@ void enqueue_message(void* message) {
}
-uint32_t read_avail(uint32_t* readoff, uint32_t* writeoff, uint32_t buffersize) {
+static uint32_t read_avail(uint32_t* readoff, uint32_t* writeoff, uint32_t buffersize) {
uint32_t limit = *writeoff;
uint32_t base = *readoff;
@@ -298,13 +298,13 @@ uint32_t read_avail(uint32_t* readoff, uint32_t* writeoff, uint32_t buffersize)
}
-int read_would_wrap(uint32_t* readoff, uint32_t buffersize, uint32_t bytes) {
+static int read_would_wrap(uint32_t* readoff, uint32_t buffersize, uint32_t bytes) {
return (((*readoff) + bytes) > buffersize);
}
-int recvsome(uint32_t* readoff, uint32_t* writeoff, uint32_t bufsize, char* readbuf, void* outbuf, int length) {
+static int recvsome(uint32_t* readoff, uint32_t* writeoff, uint32_t bufsize, char* readbuf, void* outbuf, int length) {
int available = (int)read_avail(readoff, writeoff, bufsize);
@@ -368,7 +368,7 @@ static void partial_recv(uint32_t* readoff, uint32_t* writeoff, uint32_t bufsize
}
-struct message_header* get_message() {
+struct message_header* get_message(void) {
uint32_t bufsize = ((uint32_t*)singleton_screen->rx_buffer)[0];
uint32_t* readoff = &(((uint32_t*)singleton_screen->rx_buffer)[1]);
@@ -477,7 +477,7 @@ void free_message(void* message) {
}
-int message_is_asynchronous(uint32_t opcode) {
+static int message_is_asynchronous(uint32_t opcode) {
if(opcode == REMREP_TEXTURE_CREATE ||
opcode == REMREP_TEXTURE_BLANKET ||
@@ -489,7 +489,7 @@ int message_is_asynchronous(uint32_t opcode) {
}
-void check_async_result(char* message, uint32_t opcode) {
+static void check_async_result(char* message, uint32_t opcode) {
switch(opcode) {
case REMREP_TEXTURE_CREATE: {
diff --git a/src/gallium/drivers/remote/remote_comms.h b/src/gallium/drivers/remote/remote_comms.h
index 658b8d7b28..9436fc4051 100644
--- a/src/gallium/drivers/remote/remote_comms.h
+++ b/src/gallium/drivers/remote/remote_comms.h
@@ -10,7 +10,7 @@ void* allocate_message_memory(size_t);
void enqueue_message(void*);
-struct message_header* get_message();
+struct message_header* get_message(void);
void free_message(void*);
diff --git a/src/gallium/drivers/remote/remote_debug.h b/src/gallium/drivers/remote/remote_debug.h
index f9a11620c0..d5036d541b 100644
--- a/src/gallium/drivers/remote/remote_debug.h
+++ b/src/gallium/drivers/remote/remote_debug.h
@@ -10,6 +10,8 @@ char* optotext(unsigned);
#else
#define DBG(format, args...)
+static inline char *optotext(unsigned dump) {
+}
#endif
#endif