};
struct user_process_id {
- uint32_t id;
+ uintptr_t id;
struct list_head ctx_id_mgr;
struct list_head pid_node;
static void bh_func(struct work_struct *work);
static DECLARE_WORK(bh_work, bh_func);
-static void context_add(uint32_t user_pid, uint32_t ctx_id);
+static void context_add(uintptr_t user_pid, uint32_t ctx_id);
static int invoke_api_and_release_buffer(struct ioctl_data *opaque);
static void divide_device_memory(void)
} else {
// task_id & context_id
DEBUG("add context. ctx_id: %d\n", (int)value);
- context_add((uint32_t)file, value);
+ context_add((uintptr_t)file, value);
if (copy_to_user((void *)arg, &value, sizeof(uint32_t))) {
ERROR("ioctl: failed to copy data to user.\n");
ret = -EIO;
return IRQ_HANDLED;
}
-static void context_add(uint32_t user_pid, uint32_t ctx_id)
+static void context_add(uintptr_t user_pid, uint32_t ctx_id)
{
struct list_head *pos, *temp;
struct user_process_id *pid_elem = NULL;
DEBUG("leave: %s\n", __func__);
}
-static void task_add(uint32_t user_pid)
+static void task_add(uintptr_t user_pid)
{
struct user_process_id *pid_elem = NULL;
unsigned long flags;
DEBUG("leave: %s\n", __func__);
}
-static void task_remove(uint32_t user_pid)
+static void task_remove(uintptr_t user_pid)
{
struct list_head *pos, *temp;
struct user_process_id *pid_elem = NULL;
return -EBUSY;
}
- task_add((uint32_t)file);
+ task_add((uintptr_t)file);
try_module_get(THIS_MODULE);
DEBUG("before removing task: %x\n", (uint32_t)file);
/* free resource */
- task_remove((uint32_t)file);
+ task_remove((uintptr_t)file);
module_put(THIS_MODULE);