Preserve the interrupt state and return thread ID in corelib(open).
Merge branch 'master' of https://github.com/KnightOS/KnightOS