Opened 12 years ago

Closed 11 years ago

#1412 closed enhancement (fixed)

Haiku doesn't have the sys/ipc.h sys/sem.h and sys/mman.h files.

Reported by: kaoutsis Owned by: emitrax
Priority: normal Milestone: R1
Component: - General Version: R1/pre-alpha1
Keywords: Cc: scottmc
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

Why?

  • running the LibMicro (is a portable set of microbenchmarks)

to measure the performance of various system and library calls. (Suggested by Axel). http://www.opensolaris.org/os/project/libmicro/

  • being more posix

http://www.opengroup.org/onlinepubs/007908799/xsh/sysipc.h.html http://www.opengroup.org/onlinepubs/007908799/xsh/syssem.h.html http://www.opengroup.org/pubs/online/7908799/xsh/sysmman.h.html

Attachments (1)

libMicro-0.3.0-make.txt (847 bytes) - added by kaoutsis 12 years ago.
trying to make libmicro

Download all attachments as: .zip

Change History (10)

Changed 12 years ago by kaoutsis

Attachment: libMicro-0.3.0-make.txt added

trying to make libmicro

comment:1 Changed 11 years ago by duaneb

Excuse me, has there been any progress on this ticket? I'd like to use mmap, if possible.

If the functionality is there, I'll be happy to shoulder the work, but I can't do much in terms of memory management.

comment:2 in reply to:  1 Changed 11 years ago by kaoutsis

Replying to duaneb:

Excuse me, has there been any progress on this ticket? I'd like to use mmap, if possible.

well, i have compiled the libmicro and i have made some modifications in order to use the native haiku api (namely areas), and 'half-runs'; i tried to avoid using the posix api (sys/ipc.h sys/sem.h and sys/mman.h) because there is really a question if it's worth it, just for the libmicro tests, and seems there are not 'big' apps that needs this api. i think if the modifications proved to be correct we should close the ticket. half-runs means that after the test app runs some tests, it deadlocks in one test :-)

comment:3 Changed 11 years ago by axeld

There is a private function sys_vm_map_file() (the runtime loader currently uses that one) that doesn't need much work to be able to be used as mmap() backend. Currently, it requires a file name, but that needs to be changed to get a file descriptor instead.

Of course, to properly implement mprotect() and others, more work would be needed.

comment:4 Changed 11 years ago by kaoutsis

libMicro now has its own Ticket: #2064

comment:5 Changed 11 years ago by korli

sys/mman.h was added in hrev24964

comment:6 Changed 11 years ago by scottmc

Cc: scottmc added

Another bnechmark program could use these as well, bonnie++ also requires sys/ipc.h and sys/sem.h. From their website: Bonnie++ is a benchmark suite that is aimed at performing a number of simple tests of hard drive and file system performance.

comment:7 Changed 11 years ago by emitrax

Owner: changed from axeld to emitrax

I'm working on sem.h and related functions right now. I'll see if I can work on the rest of IPC after I'm done with semaphores.

comment:8 Changed 11 years ago by emitrax

sys/sem.h has been added along with ipc.h. Although the latest theorically would imply sys/shm.h and sys/msg, which are not yet implemented, I think this ticket can be closed.

comment:9 Changed 11 years ago by axeld

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.