mirror of
https://github.com/drasko/codezero.git
synced 2026-02-03 13:43:14 +01:00
Fixed utcb updating issue that was a significant burden.
Any thread that touches a utcb inside the kernel now properly checks whether the utcb is mapped on its owner, and whether the mapped physical address matches that of the current thread's tables. If not the tables are updated. This way, even though page tables become incoherent on utcb address change situations (such as fork() exit(), execve()) they get updated as they are referenced. Since mappings are added only conditionally, caches are flushed only when an update is necessary.
This commit is contained in:
@@ -44,6 +44,9 @@ int fileio(void)
|
||||
if ((int)(cnt = read(fd, buf, strlen(str))) < 0) {
|
||||
test_printf("READ: %d", errno);
|
||||
goto out_err;
|
||||
} else if (cnt != strlen(str)) {
|
||||
test_printf("%d: Read: %d bytes from file.\n", tid, cnt);
|
||||
goto out_err;
|
||||
}
|
||||
|
||||
test_printf("%d: Read: %d bytes from file.\n", tid, cnt);
|
||||
|
||||
Reference in New Issue
Block a user