Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lustre-release
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
debian-packages
lustre-release
Commits
8395d0d6
Commit
8395d0d6
authored
16 years ago
by
Nikita Danilov
Browse files
Options
Downloads
Patches
Plain Diff
libcfs: fix mutex interface for sles10.
parent
193ebbd6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libcfs/include/libcfs/linux/linux-lock.h
+28
-26
28 additions, 26 deletions
libcfs/include/libcfs/linux/linux-lock.h
with
28 additions
and
26 deletions
libcfs/include/libcfs/linux/linux-lock.h
+
28
−
26
View file @
8395d0d6
...
@@ -50,6 +50,7 @@
...
@@ -50,6 +50,7 @@
#endif
#endif
#include
<linux/smp_lock.h>
#include
<linux/smp_lock.h>
#include
<linux/mutex.h>
/*
/*
* IMPORTANT !!!!!!!!
* IMPORTANT !!!!!!!!
...
@@ -121,21 +122,7 @@ static inline void spin_lock_nested(spinlock_t *lock, unsigned subclass)
...
@@ -121,21 +122,7 @@ static inline void spin_lock_nested(spinlock_t *lock, unsigned subclass)
* - wait_for_completion(c)
* - wait_for_completion(c)
*/
*/
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16)
/**************************************************************************
*
* Lockdep "implementation". Also see liblustre.h
*
**************************************************************************/
struct
lock_class_key
{
;
};
static
inline
void
lockdep_set_class
(
void
*
lock
,
struct
lock_class_key
*
key
)
{
}
/**************************************************************************
/**************************************************************************
*
*
...
@@ -145,14 +132,7 @@ static inline void lockdep_set_class(void *lock, struct lock_class_key *key)
...
@@ -145,14 +132,7 @@ static inline void lockdep_set_class(void *lock, struct lock_class_key *key)
*
*
**************************************************************************/
**************************************************************************/
#ifndef mutex
struct
mutex
;
# define mutex semaphore
#endif
static
inline
void
mutex_lock_nested
(
struct
mutex
*
mutex
,
unsigned
int
subclass
)
{
return
down
(
mutex
);
}
static
inline
void
mutex_destroy
(
struct
mutex
*
lock
)
static
inline
void
mutex_destroy
(
struct
mutex
*
lock
)
{
{
...
@@ -168,8 +148,30 @@ static inline void mutex_destroy(struct mutex *lock)
...
@@ -168,8 +148,30 @@ static inline void mutex_destroy(struct mutex *lock)
*/
*/
static
inline
int
mutex_is_locked
(
struct
mutex
*
lock
)
static
inline
int
mutex_is_locked
(
struct
mutex
*
lock
)
{
{
return
!!
down_trylock
(
lock
)
;
return
1
;
}
}
#endif
#endif
/* LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16) */
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
/**************************************************************************
*
* Lockdep "implementation". Also see liblustre.h
*
**************************************************************************/
struct
lock_class_key
{
;
};
static
inline
void
lockdep_set_class
(
void
*
lock
,
struct
lock_class_key
*
key
)
{
}
/* This has to be a macro, so that can be undefined in kernels that do not
* support lockdep. */
#define mutex_lock_nested(mutex, subclass) mutex_lock(mutex)
#endif
/* LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18) */
#endif
/* __LIBCFS_LINUX_CFS_LOCK_H__ */
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment