Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit b35cea7
Author: Mike Miller <[email protected]>
Date:   Fri Nov 11 07:08:07 2022 -0800

    hostname now settable by root, uptime reports the time when the app was started rather than iDevice time, stuff in /proc gets app boot time for ctime and mtime and current time for atime.  Minor code cleanup

commit 5f0b712
Author: Mike Miller <[email protected]>
Date:   Mon Nov 7 08:55:25 2022 -0800

    Fix some of my stupid, remove last of the old extra locking stuff, make lint happier, check for pending signals before doing some things

commit 6cdefc1
Author: Mike Miller <[email protected]>
Date:   Wed Nov 2 15:27:58 2022 -0700

    Added Jason Conway's Re Ordering patch (upstream PR ish-app#1944.  Fixed a bunch of compiler complaints about uncast variables, removed "easter egg" for now.

commit 02b6bd0
Merge: 50eaba1 e73525e
Author: Mike Miller <[email protected]>
Date:   Sun Oct 30 10:08:56 2022 -0700

    Merge branch 'ish-app-master' into dev
    Upstream merge

commit e73525e
Merge: 50eaba1 0c0fa0f
Author: Mike Miller <[email protected]>
Date:   Sun Oct 30 10:08:32 2022 -0700

    Merge branch 'master' of https://github.com/ish-app/ish into ish-app-master

    Merging upstream

commit 50eaba1
Author: Mike Miller <[email protected]>
Date:   Sun Oct 30 10:04:24 2022 -0700

    Fixed elock so that it doesn't crash the app when toggled

commit e98aefd
Author: Mike Miller <[email protected]>
Date:   Sat Oct 29 19:24:27 2022 -0700

    Repurpose the enable_extralocking stuff to enable or disable additional thread coherency code, disable app_nap, preliminary checks to try to figure out if a non musl/Alpine release is running.

commit 0c0fa0f
Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Date:   Fri Oct 28 06:09:13 2022 +0000

    Bump version to 429

commit 10533be
Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Date:   Fri Oct 28 00:36:07 2022 +0000

    Update Alpine repositories

commit d79dbcf
Author: Mike Miller <[email protected]>
Date:   Thu Oct 27 16:58:46 2022 -0700

    Remove what little extra locking stuff remained.  It still appears in /proc/ish for backwards compatibility, but does nothing.

commit f578a0a
Author: Mike Miller <[email protected]>
Date:   Thu Oct 27 15:49:34 2022 -0700

    Some cleanup/fixing in regards to lock->comm, plus cleanup and bug fixing of a bogus unlock of &pid_lock that I introduced in August.

commit 5ac825c
Author: Mike Miller <[email protected]>
Date:   Wed Oct 26 19:36:09 2022 -0700

    More tweaks to reduce the odds of processes hanging.  Also disabled sse, as
    it was causing issues with ssl on Alpine.

commit e718794
Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Date:   Wed Oct 26 06:09:24 2022 +0000

    Bump version to 428

commit 11e8c7f
Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Date:   Wed Oct 26 00:35:53 2022 +0000

    Update Alpine repositories

commit 2b31cc6
Author: Theodore Dubois <[email protected]>
Date:   Tue Oct 25 09:13:09 2022 -0700

    Update linux

commit 062067f
Author: Mike Miller <[email protected]>
Date:   Tue Oct 25 11:26:35 2022 -0700

    Checkpoint, much improved stability due to checking task->pending and not killing stuff when it is set.

commit 568eee3
Merge: 410615e 4daeff3
Author: Mike Miller <[email protected]>
Date:   Mon Oct 24 17:45:31 2022 -0700

    Merge branch 'ish-app-master' into dev
    Merged upstream

commit 4daeff3
Merge: 410615e 074ddee
Author: Mike Miller <[email protected]>
Date:   Mon Oct 24 17:45:04 2022 -0700

    Merge branch 'master' of https://github.com/ish-app/ish into ish-app-master

    Merged upstream changes

commit 074ddee
Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Date:   Mon Oct 24 06:38:30 2022 +0000

    Bump version to 427

commit 3aacc18
Author: Theodore Dubois <[email protected]>
Date:   Sun Oct 23 22:11:08 2022 -0700

    Port emulator poke to arm

commit 0511e42
Merge: b24478a 7be7e0d
Author: tbodt <[email protected]>
Date:   Sun Oct 23 19:30:27 2022 -0700

    Merge pull request ish-app#1933 from saagarjha/master

commit 7be7e0d
Author: Saagar Jha <[email protected]>
Date:   Sun Oct 23 18:18:57 2022 -0700

    Replace chatty syscall stubs with silent variant

    These syscalls have fallbacks in musl which we do implement but they are
    only invoked after they return ENOSYS, which fills dmesg with lots of
    spam.

commit b24478a
Author: Theodore Dubois <[email protected]>
Date:   Sun Oct 23 17:20:55 2022 -0700

    Allow specifying kconfig for xcode

commit 4d722ed
Merge: 903919e f76e46a
Author: tbodt <[email protected]>
Date:   Sun Oct 23 14:28:02 2022 -0700

    Merge pull request ish-app#1926 from jason-conway/i-make-money-movs

commit 903919e
Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Date:   Sat Oct 22 06:14:01 2022 +0000

    Bump version to 426

commit 611044e
Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Date:   Sat Oct 22 00:39:53 2022 +0000

    Update Alpine repositories

commit c07a1b5
Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Date:   Fri Oct 21 06:20:33 2022 +0000

    Bump version to 425

commit 19cc084
Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Date:   Fri Oct 21 00:36:22 2022 +0000

    Update Alpine repositories

commit defd059
Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Date:   Thu Oct 20 06:14:37 2022 +0000

    Bump version to 424

commit f18a2b0
Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Date:   Thu Oct 20 00:38:06 2022 +0000

    Update Alpine repositories

commit 5b2fbc8
Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Date:   Wed Oct 19 06:36:10 2022 +0000

    Bump version to 423

commit 4906b64
Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Date:   Wed Oct 19 00:40:18 2022 +0000

    Update Alpine repositories

commit 3b82191
Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Date:   Sun Oct 16 06:14:06 2022 +0000

    Bump version to 422

commit f76e46a
Author: Jason Conway <[email protected]>
Date:   Sat Oct 15 20:35:03 2022 -0500

    Update golden file

commit 8146bf6
Author: Jason Conway <[email protected]>
Date:   Sat Oct 15 20:33:25 2022 -0500

    Expand qemu-test and add tests for new instructions

commit 5bd020b
Author: Jason Conway <[email protected]>
Date:   Sat Oct 15 20:26:38 2022 -0500

    legalize instructions

    Add mov instructions for packed floating-point values; single-precision min, max, and sqrt; movntq and movntdq

commit 5e5263b
Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Date:   Sun Oct 16 00:41:43 2022 +0000

    Update Alpine repositories

commit 410615e
Author: Mike Miller <[email protected]>
Date:   Sat Oct 15 14:54:36 2022 -0700

    Checkpoint, build 321 I think

commit 36e181d
Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Date:   Tue Oct 11 06:25:17 2022 +0000

    Bump version to 421

commit f365fa8
Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Date:   Tue Oct 11 00:36:35 2022 +0000

    Update Alpine repositories
  • Loading branch information
jason-conway committed Nov 15, 2022
1 parent efe6fda commit 26dd852
Show file tree
Hide file tree
Showing 22 changed files with 230 additions and 212 deletions.
4 changes: 2 additions & 2 deletions app/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ static void ios_handle_exit(struct task *task, int code) {
return;
// pid should be saved now since task would be freed
pid_t pid = task->pid;
if(pids_lock.pid == pid)
unlock(&pids_lock);
// if(pids_lock.pid == pid)
// unlock(&pids_lock);
// while((critical_region_count(task)) || (locks_held_count(task))) { // Wait for now, task is in one or more critical sections, and/or has locks
// nanosleep(&lock_pause, NULL);
// }
Expand Down
2 changes: 1 addition & 1 deletion app/UserPreferences.m
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ - (BOOL)validateShouldEnableExtraLocking:(id *)value error:(NSError **)error {
// Should set task->critical_region.count to 0 for all active processes when this is set to false. Otherwise stuff blows up. -mke
if(doEnableExtraLocking == true) { // This needs to be the opposite of what you would expect because of reasons. -mke
complex_lockt(&pids_lock, 0, __FILE__, __LINE__);
dword_t res = zero_critical_regions_count();
zero_critical_regions_count();
unlock(&pids_lock);
}
return [*value isKindOfClass:NSNumber.class];
Expand Down
5 changes: 0 additions & 5 deletions emu/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -358,8 +358,6 @@ void *mem_ptr(struct mem *mem, addr_t addr, int type) {
#endif

// if page is cow, ~~milk~~ copy it
if(doEnableExtraLocking)
extra_lockf(0, __FILE__, __LINE__);

if (entry->flags & P_COW) {
lock(&current->general_lock, 0); // prevent elf_exec from doing mm_release while we are in flight? -mke
Expand All @@ -380,9 +378,6 @@ void *mem_ptr(struct mem *mem, addr_t addr, int type) {

}

if(doEnableExtraLocking)
extra_unlockf(0, __FILE__, __LINE__);

}

void *ptr = mem_ptr_nofault(mem, addr, type);
Expand Down
4 changes: 4 additions & 0 deletions fs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ static unsigned long fd_telldir(struct fd *fd) {

static void fd_seekdir(struct fd *fd, unsigned long off) {
fd->offset = off;

if (fd->ops->seekdir)
fd->ops->seekdir(fd, off);
}
Expand Down Expand Up @@ -72,6 +73,8 @@ int_t sys_getdents_common(fd_t f, addr_t dirents, dword_t count,
int printed = 0;
while (true) {
ptr = fd_telldir(fd);
extern time_t boot_time;
fd->stat.atime = (dword_t)boot_time;
struct dir_entry entry;
err = fd->ops->readdir(fd, &entry);
if (err < 0)
Expand All @@ -81,6 +84,7 @@ int_t sys_getdents_common(fd_t f, addr_t dirents, dword_t count,

size_t max_reclen = sizeof(struct linux_dirent64_) + strlen(entry.name) + 4;
char dirent_data[max_reclen];
dirent_data[0] = 0;
ino_t inode = entry.inode;
off_t_ offset = fd_telldir(fd);
const char *name = entry.name;
Expand Down
3 changes: 3 additions & 0 deletions fs/fd.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ struct fd *fd_create(const struct fd_ops *ops) {
fd->flags = 0;
fd->mount = NULL;
fd->offset = 0;
fd->stat.ctime = (dword_t)time(NULL);
list_init(&fd->poll_fds);
lock_init(&fd->poll_lock);
lock_init(&fd->lock);
Expand Down Expand Up @@ -49,6 +50,8 @@ int fd_close(struct fd *fd) {
mount_release(fd->mount);
free(fd);
}
if(fd->inode != NULL)
fd->stat.atime = (dword_t)time(NULL);
return err;
}

Expand Down
1 change: 1 addition & 0 deletions fs/pipe.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ static fd_t pipe_f_create(int pipe_fd, int flags) {
fd->stat.mode = S_IFIFO | 0660;
fd->stat.uid = current->uid;
fd->stat.gid = current->gid;
fd->stat.ctime = (dword_t)time(NULL);
return f_install(fd, flags);
}

Expand Down
4 changes: 4 additions & 0 deletions fs/proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,14 @@ static int proc_getpath(struct fd *fd, char *buf) {

static int proc_stat(struct mount *UNUSED(mount), const char *path, struct statbuf *stat) {
struct proc_entry entry = {0};
extern time_t boot_time;
int err = proc_lookup(path, &entry);
if (err < 0)
return err;
int ret = proc_entry_stat(&entry, stat);
stat->atime = (dword_t)time(NULL);
stat->mtime = (dword_t)boot_time;
stat->ctime = (dword_t)boot_time;
proc_entry_cleanup(&entry);
return ret;
}
Expand Down
1 change: 1 addition & 0 deletions jit/gadgets-aarch64/gadgets.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ _xaddr .req x3
.endm
.macro gret pop=0
ldr x8, [_ip, \pop*8]!
dmb ishld /* Jason Conway's Re Ordering patch (upstream PR #1944 */
add _ip, _ip, 8 /* TODO get rid of this */
br x8
.endm
Expand Down
3 changes: 2 additions & 1 deletion kernel/calls.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ extern bool isGlibC;

dword_t syscall_stub(void) {
STRACE("syscall_stub()");
//STRACE("syscall_stub()");
return _ENOSYS;
}
dword_t syscall_stub_silent(void) {
Expand Down Expand Up @@ -271,7 +270,9 @@ syscall_t syscall_table[] = {
[383] = (syscall_t) syscall_stub_silent, // statx
[384] = (syscall_t) sys_arch_prctl,
[403] = (syscall_t) syscall_stub, // clock_gettime64
[406] = (syscall_t) syscall_stub, // clock_getres_time64
[407] = (syscall_t) syscall_stub, // clock_nanosleep_time64
[412] = (syscall_t) syscall_stub, // utimensat_time64
[436] = (syscall_t) syscall_stub,
[439] = (syscall_t) sys_faccessat, // faccessat2
};
Expand Down
88 changes: 74 additions & 14 deletions kernel/exit.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,11 @@ noreturn void do_exit(int status) {

bool signal_pending = !!(current->pending & ~current->blocked);
// has to happen before mm_release
while((critical_region_count(current) > 1) || (locks_held_count(current)) || (current->process_info_being_read) || (signal_pending)) { // Wait for now, task is in one or more critical sections, and/or has locks, or signals in flight

while((critical_region_count(current) > 1) ||
(locks_held_count(current)) ||
(current->process_info_being_read) ||
(signal_pending)) { // Wait for now, task is in one or more critical sections, and/or has locks, or signals in flight
nanosleep(&lock_pause, NULL);
signal_pending = !!(current->pending & ~current->blocked);
}
Expand All @@ -77,17 +81,28 @@ noreturn void do_exit(int status) {
do {
nanosleep(&lock_pause, NULL);
signal_pending = !!(current->pending & ~current->blocked);
} while((critical_region_count(current) > 1) || (locks_held_count(current)) || (current->process_info_being_read) || (signal_pending)); // Wait for now, task is in one or more critical sections, and/or has locks, or signals in flight
} while((critical_region_count(current) > 1) ||
(locks_held_count(current)) ||
(current->process_info_being_read) ||
(signal_pending)); // Wait for now, task is in one or more critical
mm_release(current->mm);
current->mm = NULL;

signal_pending = !!(current->pending & ~current->blocked);
while((critical_region_count(current) > 1) || (locks_held_count(current)) || (current->process_info_being_read) || (signal_pending)) { // Wait for now, task is in one or more critical sections, and/or has locks, or signals in flight
while((critical_region_count(current) > 1) ||
(locks_held_count(current)) ||
(current->process_info_being_read) ||
(signal_pending)) { // Wait for now, task is in one or more critical // Wait for now, task is in one or more critical sections, and/or has locks, or signals in flight
nanosleep(&lock_pause, NULL);
signal_pending = !!(current->pending & ~current->blocked);
}
fdtable_release(current->files);
current->files = NULL;
while((critical_region_count(current) > 1) || (locks_held_count(current)) || (current->process_info_being_read) || (signal_pending)) { // Wait for now, task is in one or more critical sections, and/or has locks, or signals in flight

while((critical_region_count(current) > 1) ||
(locks_held_count(current)) ||
(current->process_info_being_read) ||
(signal_pending)) { // Wait for now, task is in one or more critical // Wait for now, task is in one or more critical sections, and/or has locks, or signals in flight
nanosleep(&lock_pause, NULL);
signal_pending = !!(current->pending & ~current->blocked);
}
Expand All @@ -97,8 +112,10 @@ noreturn void do_exit(int status) {
// sighand must be released below so it can be protected by pids_lock
// since it can be accessed by other threads

//while(critical_region_count(current)) {
while((critical_region_count(current) > 1) || (locks_held_count(current)) || (current->process_info_being_read) || (signal_pending)) { // Wait for now, task is in one or more critical sections, and/or has locks, or signals in flight
while((critical_region_count(current) > 1) ||
(locks_held_count(current)) ||
(current->process_info_being_read) ||
(signal_pending)) { // Wait for now, task is in one or more critical// Wait for now, task is in one or more critical sections, and/or has locks, or signals in flight
nanosleep(&lock_pause, NULL);
signal_pending = !!(current->pending & ~current->blocked);
}
Expand All @@ -115,7 +132,10 @@ noreturn void do_exit(int status) {
complex_lockt(&pids_lock, 0, __FILE__, __LINE__);
// release the sighand
signal_pending = !!(current->pending & ~current->blocked);
while((critical_region_count(current) > 2) || (locks_held_count(current)) || (current->process_info_being_read) || (signal_pending)) { // Wait for now, task is in one or more critical sections, and/or has locks, or signals in flight
while((critical_region_count(current) > 2) ||
(locks_held_count(current)) ||
(current->process_info_being_read) ||
(signal_pending)) { // Wait for now, task is in one or more critical // Wait for now, task is in one or more critical sections, and/or has locks, or signals in flight
nanosleep(&lock_pause, NULL);
signal_pending = !!(current->pending & ~current->blocked);
}
Expand All @@ -139,7 +159,10 @@ noreturn void do_exit(int status) {

signal_pending = !!(current->pending & ~current->blocked);

while((critical_region_count(current) > 2) || (locks_held_count(current)) || (current->process_info_being_read) || (signal_pending)) { // Wait for now, task is in one or more critical sections, and/or has locks, or signals in flight
while((critical_region_count(current) > 2) ||
(locks_held_count(current)) ||
(current->process_info_being_read) ||
(signal_pending)) { // Wait for now, task is in one or more critical // Wait for now, task is in one or more critical sections, and/or has locks, or signals in flight
nanosleep(&lock_pause, NULL);
signal_pending = !!(current->pending & ~current->blocked);
}
Expand Down Expand Up @@ -263,8 +286,13 @@ dword_t sys_exit_group(dword_t status) {
static bool reap_if_zombie(struct task *task, struct siginfo_ *info_out, struct rusage_ *rusage_out, int options) {
if (!task->zombie)
return false;
while((critical_region_count(task) > 1) || (locks_held_count(task))) { // Wait for now, task is in one or more critical sections, and/or has locks
bool signal_pending = !!(task->pending & ~task->blocked);
while(((signal_pending) ||
(critical_region_count(task) > 1) ||
(locks_held_count(task))) &&
(task->pid > 10)) {
nanosleep(&lock_pause, NULL);
signal_pending = !!(task->pending & ~task->blocked);
}
complex_lockt(&task->group->lock, 0, __FILE__, __LINE__);

Expand Down Expand Up @@ -292,26 +320,58 @@ static bool reap_if_zombie(struct task *task, struct siginfo_ *info_out, struct
// lock(&pids_lock); //mkemkemke Doesn't work
//if(doEnableExtraLocking) //mke Doesn't work
// extra_lockf(task->pid);
while((critical_region_count(task) > 1) || (locks_held_count(task))) { // Wait for now, task is in one or more critical sections, and/or has locks

signal_pending = !!(task->pending & ~task->blocked);
while(((signal_pending) ||
(critical_region_count(task) > 1) ||
(locks_held_count(task))) &&
(task->pid > 10)) {
nanosleep(&lock_pause, NULL);
signal_pending = !!(task->pending & ~task->blocked);
}
cond_destroy(&task->group->child_exit);
while((critical_region_count(task) > 1) || (locks_held_count(task))) { // Wait for now, task is in one or more critical sections, and/or has locks

signal_pending = !!(task->pending & ~task->blocked);
while(((signal_pending) ||
(critical_region_count(task) > 1) ||
(locks_held_count(task))) &&
(task->pid > 10)) {
nanosleep(&lock_pause, NULL);
signal_pending = !!(task->pending & ~task->blocked);
}
task_leave_session(task);
while((critical_region_count(task) > 1) || (locks_held_count(task))) { // Wait for now, task is in one or more critical sections, and/or has locks

signal_pending = !!(task->pending & ~task->blocked);
while(((signal_pending) ||
(critical_region_count(task) > 1) ||
(locks_held_count(task))) &&
(task->pid > 10)) {
nanosleep(&lock_pause, NULL);
signal_pending = !!(task->pending & ~task->blocked);
}
list_remove(&task->group->pgroup);
while((critical_region_count(task) > 1) || (locks_held_count(task))) { // Wait for now, task is in one or more critical sections, and/or has locks

signal_pending = !!(task->pending & ~task->blocked);
while(((signal_pending) ||
(critical_region_count(task) > 1) ||
(locks_held_count(task))) &&
(task->pid > 10)) {
nanosleep(&lock_pause, NULL);
signal_pending = !!(task->pending & ~task->blocked);
}
free(task->group);
while((critical_region_count(task) > 1) || (locks_held_count(task))) { // Wait for now, task is in one or more critical sections, and/or has locks

signal_pending = !!(task->pending & ~task->blocked);
while(((signal_pending) ||
(critical_region_count(task) > 1) ||
(locks_held_count(task))) &&
(task->pid > 10)) {
nanosleep(&lock_pause, NULL);
signal_pending = !!(task->pending & ~task->blocked);
}
//complex_lockt(&pids_lock, 0, __FILE__, __LINE__);
task_destroy(task);
//unlock(&pids_lock);

return true;
}
Expand Down
2 changes: 1 addition & 1 deletion kernel/fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ dword_t sys_readlinkat(fd_t at_f, addr_t path_addr, addr_t buf_addr, dword_t buf
if (user_write(buf_addr, buf, size))
return _EFAULT;
}
return size;
return (dword_t)size;
}

dword_t sys_readlink(addr_t path_addr, addr_t buf_addr, dword_t bufsize) {
Expand Down
6 changes: 1 addition & 5 deletions kernel/mmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,23 +49,19 @@ void mm_release(struct mm *mm) {
nanosleep(&lock_pause, NULL);
}

if(doEnableExtraLocking)
extra_lockf(0, __FILE__, __LINE__);
mem_destroy(&mm->mem);
while((critical_region_count(current) > 1) || (current->process_info_being_read)) { // Wait for now, task is in one or more critical sections
nanosleep(&lock_pause, NULL);
}
free(mm);
if(doEnableExtraLocking)
extra_unlockf(0, __FILE__, __LINE__);
}
}

static addr_t do_mmap(addr_t addr, dword_t len, dword_t prot, dword_t flags, fd_t fd_no, dword_t offset) {
int err;
pages_t pages = PAGE_ROUND_UP(len);
if (!pages) return _EINVAL;
page_t page;
page_t page = 0;
if (addr != 0) {
if (PGOFFSET(addr) != 0)
return _EINVAL;
Expand Down
1 change: 1 addition & 0 deletions kernel/resource_locking.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ extern unsigned critical_region_count(struct task*);
extern void modify_critical_region_counter(struct task*, int, char*, int);
extern unsigned locks_held_count(struct task*);
extern void modify_locks_held_count(struct task*, int);
extern bool current_is_valid(void);

Loading

0 comments on commit 26dd852

Please sign in to comment.