- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I need to use the function select() or sleep(). But they are not implemented in newlib after checking the
doc of newlib. How could I do? Where can I find the source code of newlib? in HLA? Thanks NeoLink Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is a usleep() function, included with the HAL. Regarding newlib, you can find it here:
http://sources.redhat.com/newlib/ (http://sources.redhat.com/newlib/) I think there's also an option to add the sources during kit installation. Cheers, - slacker- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
slacker,
Is there a mmap() function in newlib? I found one in "libc/sys/linux/mmap.c". But I cannot find mman.h file from the newlib directory. Does it mean that I only could use that function when I am working on linux? Thanks, Neo- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The source for the newlib shipped with the HAL is in $NIOS2KIT/bin/nios2-gnutools/src/newlib/newlib. You'll need to search for the file you want below there.
I wouldn't recommend using a different version of newlib since doing this can sometimes cause subtle bugs. But as slacker has pointed out, usleep is implemented in the HAL rather than in newlib. There is no mmap function in the HAL because we don't have different memory spaces for kernel and user so using just the standard read/write functions is just as efficient.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wombat,
Thanks for your clarification. At the very beginning, I am going to use mmap to implement the virtual mm, how can I do it now? Thanks, Neo
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page