Comments (3)
I change the sem_id base to a large integer.
Originally, sem_id started from 0 is a problem
from ucore_os_plus.
If so, this may not be an issue on arm as it's sem_id is the 64-bit representation of the required in pattern "0x07......". But the sem_id on i386 still looks strange to me.
BTW, what's the problem caused by sem_id starting from 0?
from ucore_os_plus.
#define VALID_SEMID(sem_id)
((uintptr_t)(sem_id) < (uintptr_t)(sem_id) + PBASE)
#define semid2sem(sem_id)
((semaphore_t *)((uintptr_t)(sem_id) + PBASE))
#define sem2semid(sem)
((sem_t)((uintptr_t)(sem) - PBASE))
/* This must NOT be 0 */
#define PBASE (KERNBASE+0x100)
on some platforms, KERNBASE may be 0, so i add 0x100 to it
On Sun, Sep 9, 2012 at 12:21 PM, Mao Junjie [email protected]:
If so, this may not be an issue on arm as it's sem_id is the 64-bit
representation of the required in pattern "0x07......". But the sem_id on
i386 still looks strange to me.BTW, what's the problem caused by sem_id starting from 0?
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/5#issuecomment-8400567.
Chen Yuheng
Computer Science
Tsinghua University
from ucore_os_plus.
Related Issues (20)
- sfs_dirtest# panics when try to enter 'home' HOT 1
- The bionic libc test test_seteuid fails HOT 2
- The bionic libc test test_getaddrinfo fails
- The bionic libc test test_setjmp fails HOT 3
- bionic libc test test_clone fails HOT 1
- The bionic libc test test_dlopen_null fails
- The bionic libc test hello_world fails
- The bionic libc test test_gethostbyname fails
- The bionic libc test test_executable_destructor fails
- The bionic libc test lib_static_init fails
- Threadgroup1 leads to memory leak
- amd64 failed to boot when RAM > 1024MB
- eventtest runs too slow in amd64
- pipetest panics (assertion failed) in amd64
- spipetest leads to memory leak in arm
- The bionic libc test ctime fails
- ucore os 答案代码 看起来会坑死人的哈哈哈
- rv32: fn setup_page_table(frame: Frame) ? HOT 1
- rv32: Question on interactions with SFENCE.VMA
- Is the MIPS supported by ucore-os-plus 64-bit or 32-bit
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ucore_os_plus.