Skip to content
Snippets Groups Projects
Commit caaab58a authored by Pham, Thi Thien Trang's avatar Pham, Thi Thien Trang
Browse files

Delete change_me.c

parent 91cebbda
No related branches found
No related tags found
No related merge requests found
/*******************************************************************
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;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment