+ -
当前位置:首页 → 问答吧 → unsigned int state_in_sysfs:1;如何解释其中的:1是赋值吗?

unsigned int state_in_sysfs:1;如何解释其中的:1是赋值吗?

时间:2009-06-04

来源:互联网

这是内核的kobject结构体中的定义。
struct kobject {
const char *name;
struct list_head entry;
struct kobject *parent;
struct kset *kset;
struct kobj_type *ktype;
struct sysfs_dirent *sd;
struct kref kref;
unsigned int state_initialized:1;
unsigned int state_in_sysfs:1;
unsigned int state_add_uevent_sent:1;
unsigned int state_remove_uevent_sent:1;
};

作者: zpcat   发布时间: 2009-06-04

占用1个字节.

作者: zoehugh   发布时间: 2009-06-04

好像不对!
应该是bit,不是byte

作者: zpcat   发布时间: 2009-06-19

查一下位段的用法吧。

作者: asnoka   发布时间: 2009-06-25

热门下载

更多