Ignore:
Timestamp:
2014-03-15T19:21:53Z (10 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c773adc
Parents:
2034f98 (diff), 8cffdf5 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/lib/math/arch/ia64/include/libarch/math.h

    r2034f98 rb0b4592e  
    11/*
    2  * Copyright (c) 2012 Petr Jerman
     2 * Copyright (c) 2014 Martin Decky
    33 * All rights reserved.
    44 *
     
    2727 */
    2828
    29 /** @addtogroup libc
     29/** @addtogroup libmathia64
    3030 * @{
    3131 */
    3232/** @file
    33  * @brief AHCI interface definition.
    3433 */
    3534
    36 #ifndef LIBC_DEVICE_AHCI_H_
    37 #define LIBC_DEVICE_AHCI_H_
     35#ifndef LIBMATH_ia64_MATH_H_
     36#define LIBMATH_ia64_MATH_H_
    3837
    39 #include <async.h>
    40 #include <devman.h>
     38#include <mathtypes.h>
     39#include <mod.h>
     40#include <trunc.h>
     41#include <trig.h>
    4142
    42 extern async_sess_t* ahci_get_sess(devman_handle_t, char **);
     43static inline double fmod(double dividend, double divisor)
     44{
     45        return double_mod(dividend, divisor);
     46}
    4347
    44 extern int ahci_get_sata_device_name(async_sess_t *, size_t, char *);
    45 extern int ahci_get_num_blocks(async_sess_t *, uint64_t *);
    46 extern int ahci_get_block_size(async_sess_t *, size_t *);
    47 extern int ahci_read_blocks(async_sess_t *, uint64_t, size_t, void *);
    48 extern int ahci_write_blocks(async_sess_t *, uint64_t, size_t, void *);
     48static inline double trunc(double val)
     49{
     50        double_t arg;
     51        arg.val = val;
     52       
     53        double_t ret;
     54        ret.data = trunc_float64(arg.data);
     55       
     56        return ret.val;
     57}
     58
     59static inline double sin(double val)
     60{
     61        return double_sin(val);
     62}
     63
     64static inline double cos(double val)
     65{
     66        return double_cos(val);
     67}
    4968
    5069#endif
Note: See TracChangeset for help on using the changeset viewer.