Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
2394704c
Commit
2394704c
authored
Oct 20, 2004
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kobject: add CONFIG_DEBUG_KOBJECT
Signed-off-by:
Greg Kroah-Hartman
<
greg@kroah.com
>
parent
a8ff8803
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
4 deletions
+13
-4
lib/Kconfig.debug
lib/Kconfig.debug
+7
-0
lib/Makefile
lib/Makefile
+5
-1
lib/kobject.c
lib/kobject.c
+1
-3
No files found.
lib/Kconfig.debug
View file @
2394704c
...
...
@@ -64,6 +64,13 @@ config DEBUG_SPINLOCK_SLEEP
If you say Y here, various routines which may sleep will become very
noisy if they are called with a spinlock held.
config DEBUG_KOBJECT
bool "kobject debugging"
depends on DEBUG_KERNEL
help
If you say Y here, some extra kobject debugging messages will be sent
to the syslog.
config DEBUG_HIGHMEM
bool "Highmem debugging"
depends on DEBUG_KERNEL && HIGHMEM && (X86 || PPC32 || MIPS || SPARC32)
...
...
lib/Makefile
View file @
2394704c
...
...
@@ -2,12 +2,16 @@
# Makefile for some libs needed in the kernel.
#
lib-y
:=
errno.o ctype.o string.o vsprintf.o cmdline.o
\
bust_spinlocks.o rbtree.o radix-tree.o dump_stack.o
\
kobject.o kref.o idr.o div64.o parser.o int_sqrt.o
\
bitmap.o extable.o kobject_uevent.o
ifeq
($(CONFIG_DEBUG_KOBJECT),y)
CFLAGS_kobject.o
+=
-DDEBUG
CFLAGS_kobject_uevent.o
+=
-DDEBUG
endif
lib-$(CONFIG_RWSEM_GENERIC_SPINLOCK)
+=
rwsem-spinlock.o
lib-$(CONFIG_RWSEM_XCHGADD_ALGORITHM)
+=
rwsem.o
...
...
lib/kobject.c
View file @
2394704c
...
...
@@ -10,8 +10,6 @@
* about using the kobject interface.
*/
#undef DEBUG
#include <linux/kobject.h>
#include <linux/string.h>
#include <linux/module.h>
...
...
@@ -123,7 +121,7 @@ char *kobject_get_path(struct kobject *kobj, int gfp_mask)
*/
void
kobject_init
(
struct
kobject
*
kobj
)
{
kref_init
(
&
kobj
->
kref
);
kref_init
(
&
kobj
->
kref
);
INIT_LIST_HEAD
(
&
kobj
->
entry
);
kobj
->
kset
=
kset_get
(
kobj
->
kset
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment