Skip to content

Commit

Permalink
o Can mostly be ignored.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Miller committed Nov 18, 2023
1 parent 580e6e6 commit acdabc5
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion fs/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ struct dev_ops *char_devs[256] = {
[TTY_ALTERNATE_MAJOR] = &tty_dev,
[TTY_PSEUDO_MASTER_MAJOR] = &tty_dev,
[TTY_PSEUDO_SLAVE_MAJOR] = &tty_dev,
// [DEV_RTC_MAJOR] = &rtc_dev_char,
[DYN_DEV_MAJOR] = &dyn_dev_char,
};

Expand Down
11 changes: 6 additions & 5 deletions fs/dyndev.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ static intptr_t dyn_open(int type, int major, int minor, struct fd *fd) {
// it's safe to access devs without locking (read-only)

if(major == DEV_RTC_MAJOR) {
return rtc_dev.open(major, minor, fd); // This should be dead code. Leaving for now to test. -mke
//return rtc_dev_char(major, minor, fd);
} else {
struct dev_ops *ops = dyn_info_char.devs[minor];
if (ops == NULL) {
Expand All @@ -69,6 +69,8 @@ static intptr_t dyn_open(int type, int major, int minor, struct fd *fd) {
return 0;
return ops->open(major, minor, fd);
}

return 0;
}

static intptr_t dyn_open_char(int major, int minor, struct fd *fd) {
Expand All @@ -89,7 +91,7 @@ struct rtc_time {
int tm_year; /* year */
};

ssize_t rtc_read(void *buf, size_t count) {
intptr_t rtc_dev(void *buf, size_t count) {
if (count < sizeof(struct rtc_time)) {
errno = EFAULT;
return -1;
Expand Down Expand Up @@ -117,7 +119,6 @@ struct dev_ops dyn_dev_char = {
.open = dyn_open_char,
};

struct dev_rtc rtc_dev = {
.open = rtc_open,
.read = rtc_read,
struct dev_ops rtc_dev_char = {
.open = rtc_dev,
};
2 changes: 1 addition & 1 deletion fs/dyndev.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
extern struct dev_ops dyn_dev_char;

// Implement fake rtc -mke
extern struct dev_rtc rtc_dev;
extern struct dev_ops rtc_dev_char;

// Registeres new block/character device with provided major and
// minor numbers, handled by provided ops
Expand Down
4 changes: 2 additions & 2 deletions jit/jit.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,9 +253,9 @@ static int cpu_step_to_interrupt(struct cpu_state *cpu, struct tlb *tlb) {
if (last_block->jump_ip[i] != NULL &&
(*last_block->jump_ip[i] & 0xffffffff) == block->addr) {
*last_block->jump_ip[i] = (unsigned long) block->code;
modify_critical_region_counter(current, 1, __FILE__, __LINE__);
//modify_critical_region_counter(current, 1, __FILE__, __LINE__);
list_add(&block->jumps_from[i], &last_block->jumps_from_links[i]);
modify_critical_region_counter(current, -1, __FILE__, __LINE__);
//modify_critical_region_counter(current, -1, __FILE__, __LINE__);
}
}
}
Expand Down
Binary file modified root.tar.gz
Binary file not shown.

0 comments on commit acdabc5

Please sign in to comment.