Example #1
0
void epm_pid_start(void)
{
	unsigned long cache_flags = SLAB_PANIC;

#ifdef CONFIG_DEBUG_SLAB
	cache_flags |= SLAB_POISON;
#endif
	pid_kddm_obj_cachep = KMEM_CACHE(pid_kddm_object, cache_flags);

	INIT_WORK(&put_pid_work, put_pid_worker);

	register_io_linker(PID_LINKER, &pid_io_linker);
	pid_kddm_set = create_new_kddm_set(kddm_def_ns,
					   PID_KDDM_ID,
					   PID_LINKER,
					   KDDM_CUSTOM_DEF_OWNER,
					   0, 0);
	if (IS_ERR(pid_kddm_set))
		OOM;

	rpc_register_int(PROC_RESERVE_PID, handle_reserve_pid, 0);
	rpc_register_int(PROC_PID_LINK_TASK, handle_pid_link_task, 0);
	rpc_register_int(PROC_END_PID_RESERVATION,
			 handle_end_pid_reservation, 0);
}
Example #2
0
void init_cluster_barrier(void)
{
	init_and_set_unique_id_root(&barrier_id_root, CLUSTER_BARRIER_MAX);
	barrier_table = hashtable_new(TABLE_SIZE);

	rpc_register_int (RPC_ENTER_BARRIER, handle_enter_barrier, 0);
	rpc_register_int (RPC_EXIT_BARRIER, handle_exit_barrier, 0);

	register_hotplug_notifier(barrier_notification, HOTPLUG_PRIO_BARRIER);
}
int init_krg_cap(void)
{
	int r;

	r = register_proc_service(KSYS_SET_CAP, proc_set_cap);
	if (r != 0)
		goto out;

	r = register_proc_service(KSYS_GET_CAP, proc_get_cap);
	if (r != 0)
		goto unreg_set_cap;

	r = register_proc_service(KSYS_SET_FATHER_CAP, proc_set_father_cap);
	if (r != 0)
		goto unreg_get_cap;

	r = register_proc_service(KSYS_GET_FATHER_CAP, proc_get_father_cap);
	if (r != 0)
		goto unreg_set_father_cap;

	r = register_proc_service(KSYS_SET_PID_CAP, proc_set_pid_cap);
	if (r != 0)
		goto unreg_get_father_cap;

	r = register_proc_service(KSYS_GET_PID_CAP, proc_get_pid_cap);
	if (r != 0)
		goto unreg_set_pid_cap;

	r = register_proc_service(KSYS_GET_SUPPORTED_CAP,
				  proc_get_supported_cap);
	if (r != 0)
		goto unreg_get_pid_cap;

#ifdef CONFIG_KRG_PROC
	rpc_register_int(PROC_GET_PID_CAP, handle_get_pid_cap, 0);
	rpc_register_int(PROC_SET_PID_CAP, handle_set_pid_cap, 0);
#endif

 out:
	return r;

 unreg_get_pid_cap:
	unregister_proc_service(KSYS_GET_PID_CAP);
 unreg_set_pid_cap:
	unregister_proc_service(KSYS_SET_PID_CAP);
 unreg_get_father_cap:
	unregister_proc_service(KSYS_GET_FATHER_CAP);
 unreg_set_father_cap:
	unregister_proc_service(KSYS_SET_FATHER_CAP);
 unreg_get_cap:
	unregister_proc_service(KSYS_GET_CAP);
 unreg_set_cap:
	unregister_proc_service(KSYS_SET_CAP);
	goto out;
}
Example #4
0
/* FAF handler Initialisation */
void faf_server_init (void)
{
	rpc_register_void(RPC_FAF_READ, handle_faf_read, 0);
	rpc_register_void(RPC_FAF_WRITE, handle_faf_write, 0);
	rpc_register_void(RPC_FAF_READV, handle_faf_readv, 0);
	rpc_register_void(RPC_FAF_WRITEV, handle_faf_writev, 0);
	faf_poll_init();
	rpc_register_void(RPC_FAF_IOCTL, handle_faf_ioctl, 0);
	rpc_register_void(RPC_FAF_FCNTL, handle_faf_fcntl, 0);

#if BITS_PER_LONG == 32
	rpc_register_void(RPC_FAF_FCNTL64, handle_faf_fcntl64, 0);
#endif

	rpc_register_void(RPC_FAF_FSTAT, handle_faf_fstat, 0);
	rpc_register_void(RPC_FAF_FSTATFS, handle_faf_fstatfs, 0);
	rpc_register_int(RPC_FAF_FSYNC, handle_faf_fsync, 0);
	rpc_register_void(RPC_FAF_FLOCK, handle_faf_flock, 0);
	rpc_register_void(RPC_FAF_LSEEK, handle_faf_lseek, 0);
	rpc_register_void(RPC_FAF_LLSEEK, handle_faf_llseek, 0);
	rpc_register_void(RPC_FAF_D_PATH, handle_faf_d_path, 0);

	rpc_register_int(RPC_FAF_BIND, handle_faf_bind, 0);
	rpc_register_void(RPC_FAF_CONNECT, handle_faf_connect, 0);
	rpc_register_int(RPC_FAF_LISTEN, handle_faf_listen, 0);
	rpc_register_void(RPC_FAF_ACCEPT, handle_faf_accept, 0);
	rpc_register_int(RPC_FAF_GETSOCKNAME, handle_faf_getsockname, 0);
	rpc_register_int(RPC_FAF_GETPEERNAME, handle_faf_getpeername, 0);
	rpc_register_int(RPC_FAF_SHUTDOWN, handle_faf_shutdown, 0);
	rpc_register_void(RPC_FAF_SETSOCKOPT, handle_faf_setsockopt, 0);
	rpc_register_void(RPC_FAF_GETSOCKOPT, handle_faf_getsockopt, 0);
	rpc_register_void(RPC_FAF_SENDMSG, handle_faf_sendmsg, 0);
	rpc_register_void(RPC_FAF_RECVMSG, handle_faf_recvmsg, 0);
	rpc_register_int(RPC_FAF_NOTIFY_CLOSE, handle_faf_notify_close, 0);
}