Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
INTsight
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lehrstuhl für Informatik 4 (Systemsoftware)
INTsight
Commits
8e9064b4
Commit
8e9064b4
authored
6 years ago
by
Luis Gerhorst
Committed by
Bernhard Heinloth
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Improve bottom handler type variable naming
parent
0582049e
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
arch/arm/measuremore/trigger.c
+19
-16
19 additions, 16 deletions
arch/arm/measuremore/trigger.c
with
19 additions
and
16 deletions
arch/arm/measuremore/trigger.c
+
19
−
16
View file @
8e9064b4
...
...
@@ -85,21 +85,24 @@ enum memo_bottom_handler {
MMBH_SOFTIRQ
};
static
char
*
bottom_handler_map_strings
[]
=
{
"workqueue
\n
"
,
"tasklet
\n
"
,
"softirq
\n
"
,
NULL
};
static
enum
memo_bottom_handler
bottom_handler_map
[]
=
{
MMBH_WORKQUEUE
,
MMBH_TASKLET
,
MMBH_SOFTIRQ
};
static
char
*
debugfs_bottom_handler_map_strings
[]
=
{
"workqueue
\n
"
,
"tasklet
\n
"
,
"softirq
\n
"
,
NULL
};
static
enum
memo_bottom_handler
debugfs_bottom_handler_map
[]
=
{
MMBH_WORKQUEUE
,
MMBH_TASKLET
,
MMBH_SOFTIRQ
};
static
const
char
*
option
_bottom_handler_str
=
"tasklet
\n
"
;
static
enum
memo_bottom_handler
option
_bottom_handler
=
MMBH_TASKLET
;
static
const
char
*
debugfs
_bottom_handler_str
=
"tasklet
\n
"
;
static
enum
memo_bottom_handler
debugfs
_bottom_handler
=
MMBH_TASKLET
;
static
ssize_t
bottom_handler_read
(
struct
file
*
fp
,
char
__user
*
user_buffer
,
static
ssize_t
debugfs_
bottom_handler_read
(
struct
file
*
fp
,
char
__user
*
user_buffer
,
size_t
count
,
loff_t
*
position
)
{
return
simple_read_from_buffer
(
user_buffer
,
count
,
position
,
option
_bottom_handler_str
,
strlen
(
option
_bottom_handler_str
));
debugfs
_bottom_handler_str
,
strlen
(
debugfs
_bottom_handler_str
));
}
static
ssize_t
bottom_handler_write
(
struct
file
*
fp
,
static
ssize_t
debugfs_
bottom_handler_write
(
struct
file
*
fp
,
const
char
__user
*
user_buffer
,
size_t
count
,
loff_t
*
position
)
{
...
...
@@ -109,10 +112,10 @@ static ssize_t bottom_handler_write(struct file *fp,
BUG
();
}
for
(
int
i
=
0
;
bottom_handler_map_strings
[
i
];
i
++
)
{
if
(
strcmp
(
bottom_handler_map_strings
[
i
],
buf
)
==
0
)
{
option
_bottom_handler
=
bottom_handler_map
[
i
];
option
_bottom_handler_str
=
bottom_handler_map_strings
[
i
];
for
(
int
i
=
0
;
debugfs_
bottom_handler_map_strings
[
i
];
i
++
)
{
if
(
strcmp
(
debugfs_
bottom_handler_map_strings
[
i
],
buf
)
==
0
)
{
debugfs
_bottom_handler
=
debugfs_
bottom_handler_map
[
i
];
debugfs
_bottom_handler_str
=
debugfs_
bottom_handler_map_strings
[
i
];
return
count
;
}
}
...
...
@@ -123,8 +126,8 @@ static ssize_t bottom_handler_write(struct file *fp,
static
const
struct
file_operations
debugfs_bottom_handler_fops
=
{
/* TODO: Not sure if this is legit, can't read/write only ask for a
* portion of the string? */
.
read
=
bottom_handler_read
,
.
write
=
bottom_handler_write
,
.
read
=
debugfs_
bottom_handler_read
,
.
write
=
debugfs_
bottom_handler_write
,
};
/***********
...
...
@@ -193,9 +196,9 @@ static u64 debugfs_cp_capacity = 25;
static
irqreturn_t
memo_irq_handler
(
int
irq
,
void
*
dev_id
)
{
memo_checkpoint
(
"irq"
);
switch
(
option
_bottom_handler
)
{
switch
(
debugfs
_bottom_handler
)
{
case
MMBH_WORKQUEUE
:
queue_work
(
system_
highpri_
wq
,
&
memo_work
);
queue_work
(
system_wq
,
&
memo_work
);
break
;
case
MMBH_TASKLET
:
tasklet_schedule
(
&
memo_tasklet
);
...
...
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