Skip to content
Snippets Groups Projects
Commit a1587100 authored by Ollrogge's avatar Ollrogge
Browse files

pb_submitter build script && minor code cleanup

parent a6fb2554
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
worker=8
time make -j"$worker" bzImage
......
#!/bin/bash
cd ./pb_utils/mod_gen/mods/
make
cd -
......
#!/bin/bash
cd ./pb_utils/pb_submitter
./build.sh
cd -
......@@ -164,7 +164,7 @@ static void enqueue_task_pb(struct rq *rq, struct task_struct *p, int flags)
/**
* Don't schedule a task that is dead. (e.g. plan was incorrect and program finished quicker)
* todo: if we have multiple tasks structs just try the next plan entry
* TODO: if we have multiple tasks structs try the next plan entry
*/
if (pb->c_entry < pb->size && pb->plan[pb->c_entry].task_struct->state == TASK_DEAD) {
premature_finish = true;
......@@ -235,7 +235,6 @@ static void check_preempt_curr_pb(struct rq *rq, struct task_struct *p, int flag
static struct task_struct * pick_next_task_pb(struct rq *rq,
struct task_struct *prev, struct rq_flags *rf)
{
// contains task to be executed
struct task_struct *picked = NULL;
enum pb_mode current_mode, next_mode;
......@@ -348,8 +347,8 @@ static void update_curr_pb(struct rq *rq)
const struct sched_class pb_sched_class = {
.next = &dl_sched_class,
.enqueue_task = enqueue_task_pb, // NOP
.dequeue_task = dequeue_task_pb, // NOP
.enqueue_task = enqueue_task_pb,
.dequeue_task = dequeue_task_pb,
.yield_task = yield_task_pb,
.check_preempt_curr = check_preempt_curr_pb, // NOP
......
......@@ -54,7 +54,7 @@ int main(int argc, char** argv)
perror("pipe");
return -1;
}
fp = fopen(argv[2], "r");
if (fp == NULL) {
usage();
......
......@@ -10,8 +10,9 @@ int main(void)
int a = 0;
int c = 0;
for (;a < 100000; a++){c = c + a;}
// check if program runs && syscall to switch tasks
// check if program runs
printf("loop run: %d, c = %d \n", b, c);
// syscall to switch tasks
usleep(10000);
}
return 0;
......
......@@ -10,8 +10,9 @@ int main(void)
int a = 0;
int c = 0;
for (;a < 10000000; a++){c = c + a;}
// check if program runs && syscall to switch tasks
// check if program runs
printf("loop run: %d, c = %d \n", b, c);
// syscall to switch tasks
usleep(1);
}
return 0;
......
......@@ -10,8 +10,9 @@ int main(void)
int a = 0;
int c = 0;
for (;a < 100000; a++){c = c + a;}
// check if program runs && syscall to switch tasks
// check if program runs
printf("loop run: %d, c = %d \n", b, c);
// syscall to switch tasks
usleep(1);
}
return 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment