31 lines
766 B
C
31 lines
766 B
C
#ifndef __SST_INTERNAL_H__
|
|
#define __SST_INTERNAL_H__
|
|
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
|
|
|
#include <linux/printk.h>
|
|
#define sst_debug(format, ...) \
|
|
pr_debug("(file:%s,line:%d,pid:%d): " format, \
|
|
__FILE__, __LINE__, \
|
|
current->pid, ##__VA_ARGS__)
|
|
|
|
#include <linux/sst.h>
|
|
#define BOUNDEDBUFFER_SIZE 20
|
|
#define BOUNDEDBUFFER_STORAGE_TYPE char*
|
|
#include "boundedbuffer.h"
|
|
#include <linux/spinlock.h>
|
|
#include <linux/semaphore.h>
|
|
#include <linux/wait.h>
|
|
|
|
struct sst_info {
|
|
struct boundedbuffer questions;
|
|
struct semaphore answers_rdy;
|
|
struct boundedbuffer answers;
|
|
struct task_struct *thread;
|
|
wait_queue_head_t wait;
|
|
spinlock_t lock_questions;
|
|
spinlock_t lock_answers;
|
|
};
|
|
typedef struct sst_info sst_info_t;
|
|
|
|
#endif // __SST_INTERNAL_H__
|