예제 #1
0
파일: battery.c 프로젝트: g7/fbpanel
static void
battery_destructor(plugin_instance *p)
{
    battery_priv *c = (battery_priv *) p;

    ENTER;
    if (c->timer)
        g_source_remove(c->timer);
    PLUGIN_CLASS(k)->destructor(p);
    class_put("meter");
    RET();
}
예제 #2
0
파일: net.c 프로젝트: g7/fbpanel
static void
net_destructor(plugin_instance *p)
{
    net_priv *c = (net_priv *) p;

    ENTER;
    if (c->timer)
        g_source_remove(c->timer);
    PLUGIN_CLASS(k)->destructor(p);
    class_put("chart");
    RET();
}
예제 #3
0
파일: volume.c 프로젝트: AmatCoder/fbpanel2
static void
volume_destructor(plugin_instance *p)
{
    volume_priv *c = (volume_priv *) p;

    ENTER;
    g_source_remove(c->update_id);
    if (c->slider_window)
        gtk_widget_destroy(c->slider_window);
    PLUGIN_CLASS(k)->destructor(p);
    class_put("meter");
    RET();
}
예제 #4
0
파일: user.c 프로젝트: g7/fbpanel
static void
user_destructor(plugin_instance *p)
{
    user_priv *c G_GNUC_UNUSED = (user_priv *) p;

    ENTER;
    PLUGIN_CLASS(k)->destructor(p);
    if (c->pid)
        kill(c->pid, SIGKILL);
    if (c->sid)
        g_source_remove(c->sid);
    class_put("menu");
    RET();
}
예제 #5
0
/*
 * test_class_get
 *	make test call to class_get which should return
 *	a pointer to the class passed in and increase
 *	the reference count to that kobject
 */
static int test_class_get() {
	int rc;
	struct class *tmp = NULL;

	/* get reference count before test call */
	tmp = class_get(&test_class);
	if (tmp == &test_class) {
		printk("tbase: Success get class\n");
		rc = 0;
	}
	else {
		printk("tbase: Failure get class\n");
		rc = 1;
	}

	class_put(&test_class);
 	return rc;
}