XenevaOS
Loading...
Searching...
No Matches
Classes | Macros | Enumerations | Functions | Variables
kobject.h File Reference
#include <linux/types.h>
#include <linux/list.h>
#include <linux/sysfs.h>
#include <linux/compiler.h>
#include <linux/container_of.h>
#include <linux/spinlock.h>
#include <linux/kref.h>
#include <linux/kobject_ns.h>
#include <linux/wait.h>
#include <linux/atomic.h>
#include <linux/workqueue.h>
#include <linux/uidgid.h>
Include dependency graph for kobject.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  kobject
 
struct  kobj_type
 
struct  kobj_uevent_env
 
struct  kset_uevent_ops
 
struct  kobj_attribute
 
struct  kset
 

Macros

#define UEVENT_HELPER_PATH_LEN   256
 
#define UEVENT_NUM_ENVP   64 /* number of env pointers */
 
#define UEVENT_BUFFER_SIZE   2048 /* buffer for the variables */
 
#define kobject_name(kobj)   (((const struct kobject *)(const void *)(kobj))->name)
 
#define kobject_uevent(kobj, action)   ((void)0)
 
#define kobject_uevent_env(kobj, action, envp)   (0)
 

Enumerations

enum  kobject_action {
  KOBJ_ADD , KOBJ_REMOVE , KOBJ_CHANGE , KOBJ_MOVE ,
  KOBJ_ONLINE , KOBJ_OFFLINE , KOBJ_BIND , KOBJ_UNBIND
}
 

Functions

 __printf (2, 3) int kobject_set_name(struct kobject *kobj
 
const char __printf (2, 0) int kobject_set_name_vargs(struct kobject *kobj
 
void kobject_init (struct kobject *kobj, const struct kobj_type *ktype)
 
 __printf (3, 4) __must_check int kobject_add(struct kobject *kobj
 
struct kobject const char __printf (4, 5) __must_check int kobject_init_and_add(struct kobject *kobj
 
struct kobject const char const struct kobj_type struct kobject const char void kobject_del (struct kobject *kobj)
 
struct kobject *__must_check kobject_create_and_add (const char *name, struct kobject *parent)
 
int __must_check kobject_rename (struct kobject *, const char *new_name)
 
int __must_check kobject_move (struct kobject *, struct kobject *)
 
struct kobject * kobject_get (struct kobject *kobj)
 
struct kobject *__must_check kobject_get_unless_zero (struct kobject *kobj)
 
void kobject_put (struct kobject *kobj)
 
const struct ns_common * kobject_namespace (const struct kobject *kobj)
 
void kobject_get_ownership (const struct kobject *kobj, kuid_t *uid, kgid_t *gid)
 
char * kobject_get_path (const void *kobj, gfp_t flag)
 
void kset_init (struct kset *kset)
 
int __must_check kset_register (struct kset *kset)
 
void kset_unregister (struct kset *kset)
 
struct kset *__must_check kset_create_and_add (const char *name, const struct kset_uevent_ops *u, struct kobject *parent_kobj)
 
struct kobject * kset_find_obj (struct kset *, const char *)
 
int kobject_synth_uevent (struct kobject *kobj, const char *buf, size_t count)
 

Variables

atomic64_t uevent_seqnum
 
const char * name
 
const char const char * fmt
 
const char const char va_list vargs
 
struct kobject * parent
 
struct kobject const char const struct kobj_type * ktype
 
const struct sysfs_ops kobj_sysfs_ops
 
struct kset __randomize_layout
 
struct kobject * kernel_kobj
 
struct kobject * mm_kobj
 
struct kobject * hypervisor_kobj
 
struct kobject * power_kobj
 
struct kobject * firmware_kobj
 
const char * format
 

Macro Definition Documentation

◆ kobject_name

#define kobject_name (   kobj)    (((const struct kobject *)(const void *)(kobj))->name)

◆ kobject_uevent

#define kobject_uevent (   kobj,
  action 
)    ((void)0)

◆ kobject_uevent_env

#define kobject_uevent_env (   kobj,
  action,
  envp 
)    (0)

◆ UEVENT_BUFFER_SIZE

#define UEVENT_BUFFER_SIZE   2048 /* buffer for the variables */

◆ UEVENT_HELPER_PATH_LEN

#define UEVENT_HELPER_PATH_LEN   256

◆ UEVENT_NUM_ENVP

#define UEVENT_NUM_ENVP   64 /* number of env pointers */

Enumeration Type Documentation

◆ kobject_action

Enumerator
KOBJ_ADD 
KOBJ_REMOVE 
KOBJ_CHANGE 
KOBJ_MOVE 
KOBJ_ONLINE 
KOBJ_OFFLINE 
KOBJ_BIND 
KOBJ_UNBIND 

Function Documentation

◆ __printf() [1/4]

const char __printf ( 2  ,
0   
)

◆ __printf() [2/4]

__printf ( 2  ,
3   
)

◆ __printf() [3/4]

__printf ( 3  ,
4   
)

◆ __printf() [4/4]

struct kobject const char __printf ( 4  ,
5   
)

◆ kobject_create_and_add()

struct kobject *__must_check kobject_create_and_add ( const char *  name,
struct kobject *  parent 
)

◆ kobject_del()

struct kobject const char const struct kobj_type struct kobject const char void kobject_del ( struct kobject *  kobj)

◆ kobject_get()

struct kobject * kobject_get ( struct kobject *  kobj)

◆ kobject_get_ownership()

void kobject_get_ownership ( const struct kobject *  kobj,
kuid_t *  uid,
kgid_t *  gid 
)

◆ kobject_get_path()

char * kobject_get_path ( const void *  kobj,
gfp_t  flag 
)

◆ kobject_get_unless_zero()

struct kobject *__must_check kobject_get_unless_zero ( struct kobject *  kobj)

◆ kobject_init()

void kobject_init ( struct kobject *  kobj,
const struct kobj_type *  ktype 
)

◆ kobject_move()

int __must_check kobject_move ( struct kobject *  ,
struct kobject *   
)

◆ kobject_namespace()

const struct ns_common * kobject_namespace ( const struct kobject *  kobj)

◆ kobject_put()

void kobject_put ( struct kobject *  kobj)

◆ kobject_rename()

int __must_check kobject_rename ( struct kobject *  ,
const char *  new_name 
)

◆ kobject_synth_uevent()

int kobject_synth_uevent ( struct kobject *  kobj,
const char *  buf,
size_t  count 
)

◆ kset_create_and_add()

struct kset *__must_check kset_create_and_add ( const char *  name,
const struct kset_uevent_ops *  u,
struct kobject *  parent_kobj 
)

◆ kset_find_obj()

struct kobject * kset_find_obj ( struct kset *  ,
const char *   
)

◆ kset_init()

void kset_init ( struct kset *  kset)

◆ kset_register()

int __must_check kset_register ( struct kset *  kset)

◆ kset_unregister()

void kset_unregister ( struct kset *  kset)

Variable Documentation

◆ __randomize_layout

struct kset __randomize_layout

◆ firmware_kobj

struct kobject* firmware_kobj
extern

◆ fmt

struct kobject const char const struct kobj_type struct kobject const char* fmt

◆ format

const char* format

◆ hypervisor_kobj

struct kobject* hypervisor_kobj
extern

◆ kernel_kobj

struct kobject* kernel_kobj
extern

◆ kobj_sysfs_ops

const struct sysfs_ops kobj_sysfs_ops
extern

◆ ktype

struct kobject const char const struct kobj_type* ktype

◆ mm_kobj

struct kobject* mm_kobj
extern

◆ name

const char* name

◆ parent

struct kobject const char const struct kobj_type struct kobject * parent

◆ power_kobj

struct kobject* power_kobj
extern

◆ uevent_seqnum

atomic64_t uevent_seqnum
extern

◆ vargs

const char const char va_list vargs