fixed comment
[common.git] / include / lv2_syscall.h
blob8826930b2384bce58715cf8cf1abf72b8cbb2071
2 /*
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; version 2 of the License.
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software
14 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 #ifndef _LV2_SYSCALL_H_
18 #define _LV2_SYSCALL_H_
20 #include <stdint.h>
22 #include <psl1ght/lv2.h>
25 * lv2_peek
27 static inline uint64_t lv2_peek(uint64_t addr)
29 return Lv2Syscall1(6, addr);
33 * lv2_poke
35 static inline void lv2_poke(uint64_t addr, uint64_t val)
37 Lv2Syscall2(7, addr, val);
41 * lv2_storage_open
43 static inline int lv2_storage_open(uint64_t dev_id, uint32_t *dev_handle)
45 return Lv2Syscall4(600, dev_id, 0, (uint64_t) dev_handle, 0);
49 * lv2_storage_close
51 static inline int lv2_storage_close(uint32_t dev_handle)
53 return Lv2Syscall1(601, dev_handle);
57 * lv2_storage_read
59 static inline int lv2_storage_read(uint32_t dev_handle, uint64_t unknown1, uint64_t start_sector, uint64_t sector_count,
60 const void *buf, uint32_t *unknown2, uint64_t unknown3)
62 return Lv2Syscall7(602, dev_handle, unknown1, start_sector, sector_count,
63 (uint64_t ) buf, (uint64_t) unknown2, unknown3);
67 * lv2_storage_write
69 static inline int lv2_storage_write(uint32_t dev_handle, uint64_t unknown1, uint64_t start_sector, uint64_t sector_count,
70 const void *buf, uint32_t *unknown2, uint64_t unknown3)
72 return Lv2Syscall7(603, dev_handle, unknown1, start_sector, sector_count,
73 (uint64_t ) buf, (uint64_t) unknown2, unknown3);
77 * lv2_storage_create_region
79 static inline int lv2_storage_create_region(uint32_t dev_handle, uint64_t start_sector,
80 uint64_t sector_count, uint64_t unknown, uint64_t laid, uint64_t *region_id)
82 return Lv2Syscall6(614, dev_handle, start_sector, sector_count, unknown, laid, (uint64_t) region_id);
86 * lv2_storage_delete_region
88 static inline int lv2_storage_delete_region(uint32_t dev_handle, uint64_t region_id)
90 return Lv2Syscall2(615, dev_handle, region_id);
93 #endif