Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
RedisLabs Raft
Commits
d0ef9a17
Commit
d0ef9a17
authored
Feb 26, 2014
by
Andrea Guzzo
Browse files
fixed some declarations and added the missing ones
so there is no need to turn off warnings for implicit-function-declaration
parent
d62351f4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Makefile
View file @
d0ef9a17
...
@@ -5,8 +5,8 @@ LLQUEUE_DIR = $(CONTRIB_DIR)/CLinkedListQueue
...
@@ -5,8 +5,8 @@ LLQUEUE_DIR = $(CONTRIB_DIR)/CLinkedListQueue
GCOV_OUTPUT
=
*
.gcda
*
.gcno
*
.gcov
GCOV_OUTPUT
=
*
.gcda
*
.gcno
*
.gcov
GCOV_CCFLAGS
=
-fprofile-arcs
-ftest-coverage
GCOV_CCFLAGS
=
-fprofile-arcs
-ftest-coverage
SHELL
=
/bin/bash
SHELL
=
/bin/bash
CFLAGS
+=
-Iinclude
-Werror
-Werror
=
return
-type
-Werror
=
uninitialized
-Wcast-align
-Wno-pointer-sign
\
CFLAGS
+=
-Iinclude
-Werror
-Werror
=
return
-type
-Werror
=
uninitialized
-Wcast-align
\
-Wno-
implicit-function-declaratio
n
-fno-omit-frame-pointer
-fno-common
-fsigned-char
\
-Wno-
pointer-sig
n
-fno-omit-frame-pointer
-fno-common
-fsigned-char
\
$(GCOV_CCFLAGS)
-I
$(LLQUEUE_DIR)
-Iinclude
-fPIC
-g
-O2
$(GCOV_CCFLAGS)
-I
$(LLQUEUE_DIR)
-Iinclude
-fPIC
-g
-O2
UNAME
:=
$(
shell
uname
)
UNAME
:=
$(
shell
uname
)
...
...
include/raft_log.h
View file @
d0ef9a17
...
@@ -6,6 +6,8 @@ typedef void* log_t;
...
@@ -6,6 +6,8 @@ typedef void* log_t;
log_t
*
log_new
();
log_t
*
log_new
();
void
log_free
(
log_t
*
me_
);
int
log_append_entry
(
log_t
*
me_
,
raft_entry_t
*
c
);
int
log_append_entry
(
log_t
*
me_
,
raft_entry_t
*
c
);
int
log_count
(
log_t
*
me_
);
int
log_count
(
log_t
*
me_
);
...
@@ -14,6 +16,8 @@ raft_entry_t* log_get_from_idx(log_t* me_, int idx);
...
@@ -14,6 +16,8 @@ raft_entry_t* log_get_from_idx(log_t* me_, int idx);
raft_entry_t
*
log_peektail
(
log_t
*
me_
);
raft_entry_t
*
log_peektail
(
log_t
*
me_
);
void
log_mark_peer_has_committed
(
log_t
*
me_
,
int
idx
);
void
log_mark_node_has_committed
(
log_t
*
me_
,
int
idx
);
void
log_delete
(
log_t
*
me_
,
int
idx
);
#endif
/* RAFT_LOG_H_ */
#endif
/* RAFT_LOG_H_ */
include/raft_private.h
View file @
d0ef9a17
...
@@ -99,10 +99,12 @@ int raft_apply_entry(raft_server_t* me_);
...
@@ -99,10 +99,12 @@ int raft_apply_entry(raft_server_t* me_);
int
raft_append_entry
(
raft_server_t
*
me_
,
raft_entry_t
*
c
);
int
raft_append_entry
(
raft_server_t
*
me_
,
raft_entry_t
*
c
);
void
raft_set_commit_idx
(
raft_server_t
*
me
,
int
commit_idx
);
void
raft_set_commit_idx
(
raft_server_t
*
me
,
int
commit_idx
);
int
raft_get_commit_idx
(
raft_server_t
*
me_
);
void
raft_set_last_applied_idx
(
raft_server_t
*
me
,
int
idx
);
void
raft_set_last_applied_idx
(
raft_server_t
*
me
,
int
idx
);
void
raft_set_state
(
raft_server_t
*
me_
,
int
state
);
void
raft_set_state
(
raft_server_t
*
me_
,
int
state
);
int
raft_get_state
(
raft_server_t
*
me_
);
raft_node_t
*
raft_node_new
(
void
*
udata
);
raft_node_t
*
raft_node_new
(
void
*
udata
);
...
...
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