Changeset bf9afa07 in mainline for libc/generic/time.c


Ignore:
Timestamp:
2006-06-02T11:35:05Z (19 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2d22049
Parents:
49d072e
Message:

Allocation function for allocating free areas for mmap, map_physmem etc.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libc/generic/time.c

    r49d072e rbf9afa07  
    5757 * sequence of subsequent gettimeofday calls is ordered.
    5858 */
    59 #define TMAREA (100*1024*1024)
    6059int gettimeofday(struct timeval *tv, struct timezone *tz)
    6160{
     
    6665
    6766        if (!ktime) {
    68                 /* TODO: specify better, where to map the area */
     67                mapping = as_get_mappable_page(PAGE_SIZE);
    6968                /* Get the mapping of kernel clock */
    7069                res = ipc_call_sync_3(PHONE_NS, IPC_M_AS_AREA_RECV,
    71                                       TMAREA,
    72                                       PAGE_SIZE,
    73                                       0,
     70                                      mapping, PAGE_SIZE, 0,
    7471                                      NULL,&rights,NULL);
    7572                if (res) {
     
    8077                        printf("Received bad rights on time area: %X\n",
    8178                               rights);
    82                         as_area_destroy(TMAREA);
     79                        as_area_destroy(mapping);
    8380                        _exit(1);
    8481                }
    85                 ktime = (void *) (TMAREA);
     82                ktime = mapping;
    8683        }
    8784        if (tz) {
Note: See TracChangeset for help on using the changeset viewer.