Skip to content

Gitwick/sap {DRAFT}#2

Open
saritwik wants to merge 2 commits intomasterfrom
gitwick/sap
Open

Gitwick/sap {DRAFT}#2
saritwik wants to merge 2 commits intomasterfrom
gitwick/sap

Conversation

@saritwik
Copy link
Collaborator

No description provided.

Copy link
Owner

@one-harsh one-harsh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would probably also need a new API called mythread() in defs.h.


// t->lock must be held when using these:
int tid;
enum procstate state;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need this. We need a pointer to parent proc itself.


enum procstate { UNUSED, SLEEPING, RUNNABLE, RUNNING, ZOMBIE };

struct thread
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also need trapframe here.



// Per-process state
struct proc {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove trapFrame from here.

Copy link
Owner

@one-harsh one-harsh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs more changes.

struct thread *tcb;
struct threadlist *next;
};

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While the fancy list is nice and gives a container like ability, but let's keep things simple for now and just use an array.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants