freebsd compat. layer: gcc 4 fixes, it seems __FUNCTION__ is variant.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21074 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,7 +1,18 @@
|
|||||||
#ifndef _FBSD_COMPAT_SYS__TASK_H_
|
#ifndef _FBSD_COMPAT_SYS__TASK_H_
|
||||||
#define _FBSD_COMPAT_SYS__TASK_H_
|
#define _FBSD_COMPAT_SYS__TASK_H_
|
||||||
|
|
||||||
|
/* Haiku's list management */
|
||||||
|
#include <util/list.h>
|
||||||
|
|
||||||
|
typedef void (*task_handler_t)(void *context, int pending);
|
||||||
|
|
||||||
struct task {
|
struct task {
|
||||||
|
int ta_priority;
|
||||||
|
task_handler_t ta_handler;
|
||||||
|
void *ta_argument;
|
||||||
|
int ta_pending;
|
||||||
|
|
||||||
|
struct list_link ta_link;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -2,14 +2,12 @@
|
|||||||
#define _FBSD_COMPAT_SYS_TASKQUEUE_H_
|
#define _FBSD_COMPAT_SYS_TASKQUEUE_H_
|
||||||
|
|
||||||
#include <sys/kernel.h>
|
#include <sys/kernel.h>
|
||||||
|
#include <sys/_task.h>
|
||||||
|
|
||||||
#define PI_NET 0
|
#define PI_NET 0
|
||||||
|
|
||||||
struct task;
|
|
||||||
struct taskqueue;
|
struct taskqueue;
|
||||||
|
|
||||||
typedef void (*task_handler_t)(void *context, int pending);
|
|
||||||
|
|
||||||
#define TASK_INIT(taskp, prio, hand, arg) task_init(taskp, prio, hand, arg)
|
#define TASK_INIT(taskp, prio, hand, arg) task_init(taskp, prio, hand, arg)
|
||||||
|
|
||||||
typedef void (*taskqueue_enqueue_fn)(void *context);
|
typedef void (*taskqueue_enqueue_fn)(void *context);
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
#define _DEVICE_H_
|
#define _DEVICE_H_
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <KernelExport.h>
|
#include <KernelExport.h>
|
||||||
#include <drivers/PCI.h>
|
#include <drivers/PCI.h>
|
||||||
@@ -51,8 +52,16 @@ enum {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#define UNIMPLEMENTED() \
|
static inline void
|
||||||
panic("fbsd compat, unimplemented: " __FUNCTION__)
|
__unimplemented(const char *method)
|
||||||
|
{
|
||||||
|
char msg[128];
|
||||||
|
snprintf(msg, sizeof(msg), "fbsd compat, unimplemented: %s", method);
|
||||||
|
panic(msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#define UNIMPLEMENTED() __unimplemented(__FUNCTION__)
|
||||||
|
|
||||||
status_t init_mbufs(void);
|
status_t init_mbufs(void);
|
||||||
void uninit_mbufs(void);
|
void uninit_mbufs(void);
|
||||||
|
|||||||
@@ -9,20 +9,10 @@
|
|||||||
#include "device.h"
|
#include "device.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <util/list.h>
|
|
||||||
|
|
||||||
#include <compat/sys/taskqueue.h>
|
#include <compat/sys/taskqueue.h>
|
||||||
#include <compat/sys/haiku-module.h>
|
#include <compat/sys/haiku-module.h>
|
||||||
|
|
||||||
struct task {
|
|
||||||
int ta_priority;
|
|
||||||
task_handler_t ta_handler;
|
|
||||||
void *ta_argument;
|
|
||||||
int ta_pending;
|
|
||||||
|
|
||||||
struct list_link ta_link;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct taskqueue {
|
struct taskqueue {
|
||||||
char tq_name[64];
|
char tq_name[64];
|
||||||
mutex tq_mutex;
|
mutex tq_mutex;
|
||||||
|
|||||||
Reference in New Issue
Block a user