Translation Information

Project website docs.freebsd.org/en
Translation process
  • Translations can be made directly.
  • Translation suggestions can be made.
  • Only chosen users can contribute.
  • The translation uses bilingual files.
Translation license BSD 2-Clause "Simplified" License
Filemask documentation/content/*/books/arch-handbook/kobj/chapter.po
Translation file Download documentation/content/zh_CN/books/arch-handbook/kobj/chapter.po
[return value = ] FOO_BAR(object [, other parameters]);
[返回值 = ] FOO_BAR(对象 [, 其它参数]);
3 days ago
New contributor 3 days ago
struct foo_data {
KOBJ_FIELDS;
foo_foo;
foo_bar;
};
struct foo_data {
KOBJ_FIELDS;
foo_foo;
foo_bar;
};
3 days ago
New contributor 3 days ago
The third step in using Kobj involves how to define the object. Kobj object creation routines assume that Kobj data is at the head of an object. If this in not appropriate you will have to allocate the object yourself and then use `kobj_init()` on the Kobj portion of it; otherwise, you may use `kobj_create()` to allocate and initialize the Kobj portion of the object automatically. `kobj_init()` may also be used to change the class that an object uses.
使用Kobj的第三步是定义对象。Kobj对象建立程序假定Kobj专有数据在一个对象的头部。如果不是如此,应当先自行分配对象,再使用<function>kobj_init()</function>初始化对象中的Kobj专有数据;其实可以使用<function>kobj_create()</function>分配对象,并自动初始化对象中的Kobj专有内容。<function>kobj_init()</function>也可以用来改变一个对象所使用的类。
3 days ago
New contributor 3 days ago
The second step in using Kobj is to create a class. A class consists of a name, a table of methods, and the size of objects if Kobj's object handling facilities are used. To create the class use the macro `DEFINE_CLASS()`. To create the method table create an array of kobj_method_t terminated by a NULL entry. Each non-NULL entry may be created using the macro `KOBJMETHOD()`.
使用Kobj的第二步是建立一个类。一个类的组有名字、方法表;假如使用了Kobj的“对象管理工具”(Object Handling Facilities),类中还包含对象的大小。建立类时使用宏<function>DEFINE_CLASS()</function>。建立方法表时,须建立一个 kobj_method_t 数组,用NULL项结尾。每个非 NULL 项可用宏<function>KOBJMETHOD()</function>建立。
3 days ago
New contributor 3 days ago
src/sys/kern/bus_if.m
src/sys/kern/device_if.m
src/sys/kern/bus_if.m
src/sys/kern/device_if.m
3 days ago
New contributor 3 days ago
Browse all translation changes

Statistics

Percent Strings Words Chars
Total 59 972 6,253
Translated 50% 30 348 2,055
Needs editing 25% 15 384 2,532
Failing checks 15% 9 91 771

Last activity

Last change April 11, 2021, 1:18 p.m.
Last author Anonymous

Daily activity

Daily activity

Weekly activity

Weekly activity