git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
refactor: make pci device driver loading passive, pci bus scanner will not load them...
[lunaix-os.git]
/
lunaix-os
/
kernel
/
kprint
/
kp_records.c
diff --git
a/lunaix-os/kernel/kprint/kp_records.c
b/lunaix-os/kernel/kprint/kp_records.c
index d323bc1640dd909ec85a1b0b2d6928362e389727..61eb2135282a6fcbc77603f25fb8c752ece98243 100644
(file)
--- a/
lunaix-os/kernel/kprint/kp_records.c
+++ b/
lunaix-os/kernel/kprint/kp_records.c
@@
-7,7
+7,7
@@
#include "kp_records.h"
struct kp_records*
#include "kp_records.h"
struct kp_records*
-kp
_
rec_create(int max_recs)
+kprec_create(int max_recs)
{
struct kp_records* recs = (struct kp_records*)valloc(KP_RECS_SIZE);
{
struct kp_records* recs = (struct kp_records*)valloc(KP_RECS_SIZE);
@@
-21,18
+21,18
@@
kp_rec_create(int max_recs)
}
static inline int
}
static inline int
-kp
_
recs_full(struct kp_records* recs)
+kprecs_full(struct kp_records* recs)
{
return recs->cur_recs >= recs->max_recs;
}
{
return recs->cur_recs >= recs->max_recs;
}
-void
-kp
_
rec_put(struct kp_records* recs, int lvl, char* content, size_t len)
+struct kp_entry*
+kprec_put(struct kp_records* recs, int lvl, char* content, size_t len)
{
assert(len < 256);
struct kp_entry* ent;
{
assert(len < 256);
struct kp_entry* ent;
- if (!kp
_
recs_full(recs)) {
+ if (!kprecs_full(recs)) {
assert(recs->kp_ent_wp == &recs->kp_ents.ents);
ent = (struct kp_entry*)vzalloc(KP_ENT_SIZE);
assert(recs->kp_ent_wp == &recs->kp_ents.ents);
ent = (struct kp_entry*)vzalloc(KP_ENT_SIZE);
@@
-51,4
+51,6
@@
kp_rec_put(struct kp_records* recs, int lvl, char* content, size_t len)
ent->lvl = lvl;
ent->content = _content;
ent->time = clock_systime();
ent->lvl = lvl;
ent->content = _content;
ent->time = clock_systime();
+
+ return ent;
}
\ No newline at end of file
}
\ No newline at end of file