Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
APO_sem
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Pelech, Ondřej
APO_sem
Commits
caaab58a
Commit
caaab58a
authored
1 year ago
by
Pham, Thi Thien Trang
Browse files
Options
Downloads
Patches
Plain Diff
Delete change_me.c
parent
91cebbda
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
main/change_me.c
+0
-55
0 additions, 55 deletions
main/change_me.c
with
0 additions
and
55 deletions
main/change_me.c
deleted
100644 → 0
+
0
−
55
View file @
91cebbda
/*******************************************************************
Project main function template for MicroZed based MZ_APO board
designed by Petr Porazil at PiKRON
change_me.c - main file
include your name there and license for distribution.
Remove next text: This line should not appear in submitted
work and project name should be change to match real application.
If this text is there I want 10 points subtracted from final
evaluation.
*******************************************************************/
#define _POSIX_C_SOURCE 200112L
#include
<stdlib.h>
#include
<stdio.h>
#include
<stdint.h>
#include
<time.h>
#include
<unistd.h>
#include
"mzapo_parlcd.h"
#include
"mzapo_phys.h"
#include
"mzapo_regs.h"
#include
"serialize_lock.h"
int
main
(
int
argc
,
char
*
argv
[])
{
/* Serialize execution of applications */
/* Try to acquire lock the first */
if
(
serialize_lock
(
1
)
<=
0
)
{
printf
(
"System is occupied
\n
"
);
if
(
1
)
{
printf
(
"Waitting
\n
"
);
/* Wait till application holding lock releases it or exits */
serialize_lock
(
0
);
}
}
printf
(
"Hello world
\n
"
);
sleep
(
4
);
printf
(
"Goodbye world
\n
"
);
/* Release the lock */
serialize_unlock
();
return
0
;
}
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