Esempio n. 1
0
bool ke_srv_register(const struct ke_srv_info * info)
{
	int id = KE_SRV_GET_CLASZ(info->service_id_base);

	/* Set the SRV info pointer, which is the root of the subsystem */
	if (ke_interface_v2[id])
	{
		printk("内核服务 %s 所在的IDBASE已经被注册,无法再次注册。\n", info->name);
		return false;
	}
	ke_interface_v2[id] = info;

	return true;
}
Esempio n. 2
0
File: srv.c Progetto: goumuli/GridOS
asmregparm unsigned long arch_system_call(unsigned long * req)
{
	unsigned long req_id = * req;
	unsigned long ret;
	int clasz = KE_SRV_GET_CLASZ(req_id);
	unsigned long (*func)(unsigned long func_id, void * req);

//	printk("syscall at class %d, req id %d.\n", clasz, KE_SRV_GET_FID(req_id));

	func = ke_interface_v2[clasz]->request_enqueue;
	ret	= ka_call_dynamic_module_entry(func, KE_SRV_GET_FID(req_id), req);

	/* But is a dead thread? */
	//TODO

	return ret;
}