Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TP_xv6
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
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
Fache Charles
TP_xv6
Commits
b54f07e1
Commit
b54f07e1
authored
1 year ago
by
Fache Charles
Browse files
Options
Downloads
Patches
Plain Diff
4.4 tests pass, code not cleaned up, likely messy and buggy
parent
ef1dd479
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
kernel/sysfile.c
+8
-1
8 additions, 1 deletion
kernel/sysfile.c
with
8 additions
and
1 deletion
kernel/sysfile.c
+
8
−
1
View file @
b54f07e1
...
...
@@ -487,8 +487,9 @@ uint64
sys_create_mutex
(
void
)
{
// char path[MAXPATH];
int
fd
;
//, omode
;
long
fd
;
struct
file
*
f
;
char
name
[
14
]
=
"Mutex nb "
;
// struct inode *ip;
// int n;
...
...
@@ -542,7 +543,13 @@ sys_create_mutex(void)
// f->readable = !(omode & O_WRONLY);
// f->writable = (omode & O_WRONLY) || (omode & O_RDWR);
// Transforming fd into a string, manually, painfully
unsigned
char
*
fdstring
=
(
unsigned
char
*
)
&
fd
;
name
[
9
]
=
*
fdstring
;
f
->
type
=
FD_MUTEX
;
initsleeplock
(
&
(
f
->
mutex
),
name
);
// iunlock(ip);
// end_op(ROOTDEV);
...
...
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