-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement POSIX compatibile layer #98
Comments
At present, we only have to implement a minimal set of libposix based on the existing directory user/lib . OKL4 implements POSIX functionality through Iguana which provides additional operating system services on top of the sparse L4 kernel. We don't need the complex layers like OKL4, but only the proof-of-concept work for the further compatibility verification purpose. |
I just try to add a posix layer in user/lib. But I'm not sure what I did is correct. |
As we discussed last week, we would like to implement partial APIs defined in PSE51. PSE51 or POSIX Minimal has 287 APIs and is aimed at small embedded system, with no MMU, no disk, no terminal. For this issue, we expect to implement some pthread functions such as:
Please note that we don't want to implement full PSE51 at the moment. Instead, we just want to have a primitive and incomplete POSIX compatibility layer first, then we can verify F9 internals by several conformance suites later. Reference: |
By now, we do not have a method to transmit our global data. So we have to design the method first. |
I encounter a problem. How can I get the current running user's information after entering I have a idea now. Maybe we could save the current user's information in KIP. When processing context switch, replace KIP's user field with current user. But it will increase overhead in context switch and cause complex architecture in context switch. In short, I think we need a mechanism to identify current user. Without that, we can not determine which user should I serve in the posix library. Have any suggestion? |
To @georgekang, can you explain how Fiasco/L4 + L4Re maniplates threading model? |
@jserv, please check rampant1018@8423fc5. |
@rampant1018, I have one line patch to solve your POSIX thread exit problem. And the other problem is that uint32_t ipc_timeout(void *data)
{
ktimer_event_t *event = (ktimer_event_t *) data;
tcb_t* from_thr = (tcb_t*) event->data;
from_thr->state = T_RUNNABLE;
sched_slot_dispatch(SSI_NORMAL_THREAD, from_thr);
return 0;
} So after |
@arcbbb, thanks! I have another question about pthread internal architecture. For now, I tried to maintain a tree structure in pthread implementation which contained parent, child, sibling relation. However, there is a same structure in kernel(thread list). Is it a good idea to keep them individual? |
@rampant1018 , actually I have another idea to implement pthread. |
It sounds interesting! Do you mean that manage pthread in userspace instead of using By the way, I had the impression that scheduler design in |
Codezero microkernel implements a primitive POSIX compatibility layer: posix, and we had an incomplete porting for its userspace library in branch userlib.
We expect to implement primitive POSIX compatibility layer as Codezero does.
The text was updated successfully, but these errors were encountered: