Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
ccan
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mirror
ccan
Commits
6892edd6
Commit
6892edd6
authored
Mar 17, 2011
by
Rusty Russell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tdb2: rename tdb_lock_type to tdb_lock
Internal reshuffle which makes things shorter and neater.
parent
41e027e1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
8 deletions
+7
-8
ccan/tdb2/lock.c
ccan/tdb2/lock.c
+4
-5
ccan/tdb2/private.h
ccan/tdb2/private.h
+3
-3
No files found.
ccan/tdb2/lock.c
View file @
6892edd6
...
...
@@ -236,8 +236,7 @@ enum TDB_ERROR tdb_allrecord_upgrade(struct tdb_context *tdb)
"tdb_allrecord_upgrade failed"
);
}
static
struct
tdb_lock_type
*
find_nestlock
(
struct
tdb_context
*
tdb
,
tdb_off_t
offset
)
static
struct
tdb_lock
*
find_nestlock
(
struct
tdb_context
*
tdb
,
tdb_off_t
offset
)
{
unsigned
int
i
;
...
...
@@ -276,7 +275,7 @@ static enum TDB_ERROR tdb_nest_lock(struct tdb_context *tdb,
tdb_off_t
offset
,
int
ltype
,
enum
tdb_lock_flags
flags
)
{
struct
tdb_lock
_type
*
new_lck
;
struct
tdb_lock
*
new_lck
;
enum
TDB_ERROR
ecode
;
if
(
offset
>
(
TDB_HASH_LOCK_START
+
TDB_HASH_LOCK_RANGE
...
...
@@ -311,7 +310,7 @@ static enum TDB_ERROR tdb_nest_lock(struct tdb_context *tdb,
"tdb_nest_lock: already have a hash lock?"
);
}
new_lck
=
(
struct
tdb_lock
_type
*
)
realloc
(
new_lck
=
(
struct
tdb_lock
*
)
realloc
(
tdb
->
file
->
lockrecs
,
sizeof
(
*
tdb
->
file
->
lockrecs
)
*
(
tdb
->
file
->
num_lockrecs
+
1
));
if
(
new_lck
==
NULL
)
{
...
...
@@ -360,7 +359,7 @@ static enum TDB_ERROR tdb_nest_lock(struct tdb_context *tdb,
static
enum
TDB_ERROR
tdb_nest_unlock
(
struct
tdb_context
*
tdb
,
tdb_off_t
off
,
int
ltype
)
{
struct
tdb_lock
_type
*
lck
;
struct
tdb_lock
*
lck
;
enum
TDB_ERROR
ecode
;
if
(
tdb
->
flags
&
TDB_NOLOCK
)
...
...
ccan/tdb2/private.h
View file @
6892edd6
...
...
@@ -300,7 +300,7 @@ enum tdb_lock_flags {
TDB_LOCK_NOCHECK
=
4
,
};
struct
tdb_lock
_type
{
struct
tdb_lock
{
uint32_t
off
;
uint32_t
count
;
uint32_t
ltype
;
...
...
@@ -329,9 +329,9 @@ struct tdb_file {
int
fd
;
/* Lock information */
struct
tdb_lock
_type
allrecord_lock
;
struct
tdb_lock
allrecord_lock
;
size_t
num_lockrecs
;
struct
tdb_lock
_type
*
lockrecs
;
struct
tdb_lock
*
lockrecs
;
/* Identity of this file. */
dev_t
device
;
...
...
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