Changeset 56210a7 in mainline
- Timestamp:
- 2025-01-29T13:06:25Z (3 weeks ago)
- Branches:
- master
- Children:
- a796812c
- Parents:
- 1fa6292
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2025-01-29 13:04:40)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2025-01-29 13:06:25)
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
boot/arch/riscv64/src/asm.S
r1fa6292 r56210a7 108 108 or t0, t0, t1 109 109 110 csrw s ptbr, t0110 csrw satp, t0 111 111 112 112 /* Jump to supervisor mode */ -
kernel/arch/riscv64/src/mm/page.c
r1fa6292 r56210a7 85 85 86 86 asm volatile ( 87 "csrw s ptbr, %[satp]\n"88 :: [satp ] "r" (satp)87 "csrw satp, %[satpv]\n" 88 :: [satpv] "r" (satp) 89 89 ); 90 90 } -
tools/toolchain.sh
r1fa6292 r56210a7 31 31 BINUTILS_GDB_GIT="https://github.com/HelenOS/binutils-gdb.git" 32 32 33 BINUTILS_BRANCH="binutils-2_4 1-helenos"34 BINUTILS_VERSION="2.4 1"33 BINUTILS_BRANCH="binutils-2_43-helenos" 34 BINUTILS_VERSION="2.43" 35 35 36 36 GDB_BRANCH="gdb-13.2-helenos" … … 38 38 39 39 GCC_GIT="https://github.com/HelenOS/gcc.git" 40 GCC_BRANCH="1 3_2_0-helenos"41 GCC_VERSION="1 3.2"40 GCC_BRANCH="14_2_0-helenos" 41 GCC_VERSION="14.2" 42 42 43 43 BASEDIR="$PWD" … … 419 419 --enable-languages=c,c++,go \ 420 420 --enable-lto \ 421 --enable-obsolete \ 421 422 --disable-shared \ 422 423 --disable-werror \ -
uspace/drv/block/virtio-blk/virtio-blk.c
r1fa6292 r56210a7 365 365 } 366 366 367 vdev->queues = calloc( sizeof(virtq_t), num_queues);367 vdev->queues = calloc(num_queues, sizeof(virtq_t)); 368 368 if (!vdev->queues) { 369 369 rc = ENOMEM; -
uspace/drv/nic/virtio-net/virtio-net.c
r1fa6292 r56210a7 221 221 } 222 222 223 vdev->queues = calloc( sizeof(virtq_t), num_queues);223 vdev->queues = calloc(num_queues, sizeof(virtq_t)); 224 224 if (!vdev->queues) { 225 225 rc = ENOMEM; -
uspace/lib/c/arch/arm32/src/atomic.c
r1fa6292 r56210a7 86 86 } 87 87 88 unsigned char __atomic_exchange_1(volatile void *mem0, unsigned char val, 89 int model) 90 { 91 volatile unsigned char *mem = mem0; 92 93 (void) model; 94 95 unsigned ret; 96 97 /* 98 * The following instructions between labels 1 and 2 constitute a 99 * Restartable Atomic Seqeunce. Should the sequence be non-atomic, 100 * the kernel will restart it. 101 */ 102 asm volatile ( 103 "1:\n" 104 " adr %[ret], 1b\n" 105 " str %[ret], %[rp0]\n" 106 " adr %[ret], 2f\n" 107 " str %[ret], %[rp1]\n" 108 " ldrb %[ret], %[addr]\n" 109 " strb %[imm], %[addr]\n" 110 "2:\n" 111 : [ret] "=&r" (ret), 112 [rp0] "=m" (ras_page[0]), 113 [rp1] "=m" (ras_page[1]), 114 [addr] "+m" (*mem) 115 : [imm] "r" (val) 116 ); 117 118 ras_page[0] = 0; 119 ras_page[1] = 0xffffffff; 120 121 return ret; 122 } 123 124 unsigned short __atomic_exchange_2(volatile void *mem0, unsigned short val, 125 int model) 126 { 127 volatile unsigned short *mem = mem0; 128 129 (void) model; 130 131 unsigned ret; 132 133 /* 134 * The following instructions between labels 1 and 2 constitute a 135 * Restartable Atomic Seqeunce. Should the sequence be non-atomic, 136 * the kernel will restart it. 137 */ 138 asm volatile ( 139 "1:\n" 140 " adr %[ret], 1b\n" 141 " str %[ret], %[rp0]\n" 142 " adr %[ret], 2f\n" 143 " str %[ret], %[rp1]\n" 144 " ldrh %[ret], %[addr]\n" 145 " strh %[imm], %[addr]\n" 146 "2:\n" 147 : [ret] "=&r" (ret), 148 [rp0] "=m" (ras_page[0]), 149 [rp1] "=m" (ras_page[1]), 150 [addr] "+m" (*mem) 151 : [imm] "r" (val) 152 ); 153 154 ras_page[0] = 0; 155 ras_page[1] = 0xffffffff; 156 157 return ret; 158 } 159 160 unsigned __atomic_exchange_4(volatile void *mem0, unsigned val, int model) 161 { 162 volatile unsigned *mem = mem0; 163 164 (void) model; 165 166 unsigned ret; 167 168 /* 169 * The following instructions between labels 1 and 2 constitute a 170 * Restartable Atomic Seqeunce. Should the sequence be non-atomic, 171 * the kernel will restart it. 172 */ 173 asm volatile ( 174 "1:\n" 175 " adr %[ret], 1b\n" 176 " str %[ret], %[rp0]\n" 177 " adr %[ret], 2f\n" 178 " str %[ret], %[rp1]\n" 179 " ldr %[ret], %[addr]\n" 180 " str %[imm], %[addr]\n" 181 "2:\n" 182 : [ret] "=&r" (ret), 183 [rp0] "=m" (ras_page[0]), 184 [rp1] "=m" (ras_page[1]), 185 [addr] "+m" (*mem) 186 : [imm] "r" (val) 187 ); 188 189 ras_page[0] = 0; 190 ras_page[1] = 0xffffffff; 191 192 return ret; 193 } 194 88 195 unsigned short __atomic_fetch_add_2(volatile void *mem0, unsigned short val, 89 196 int model) … … 164 271 } 165 272 273 bool __atomic_test_and_set(volatile void *ptr, int memorder) 274 { 275 volatile unsigned char *b = ptr; 276 277 unsigned char orig = __atomic_exchange_n(b, (unsigned char) true, memorder); 278 return orig != 0; 279 } 280 166 281 void __sync_synchronize(void) 167 282 { -
uspace/lib/cpp/include/__bits/io/ios.hpp
r1fa6292 r56210a7 403 403 delete[] parray_; 404 404 parray_size_ = rhs.parray_size_; 405 parray_ = new long[parray_size_];405 parray_ = new void *[parray_size_]; 406 406 407 407 for (size_t i = 0; i < parray_size_; ++i) -
uspace/lib/trackmod/protracker.c
r1fa6292 r56210a7 146 146 147 147 cells = module->channels * protracker_pattern_rows; 148 buf = calloc( sizeof(uint32_t), cells);148 buf = calloc(cells, sizeof(uint32_t)); 149 149 150 150 if (buf == NULL) { … … 156 156 module->pattern[i].rows = protracker_pattern_rows; 157 157 module->pattern[i].channels = module->channels; 158 module->pattern[i].data = calloc( sizeof(trackmod_cell_t), cells);158 module->pattern[i].data = calloc(cells, sizeof(trackmod_cell_t)); 159 159 if (module->pattern[i].data == NULL) { 160 160 rc = ENOMEM; … … 326 326 327 327 module->instrs = samples; 328 module->instr = calloc(s izeof(trackmod_instr_t), samples);328 module->instr = calloc(samples, sizeof(trackmod_instr_t)); 329 329 if (module->instr == NULL) { 330 330 printf("Out of memory.\n"); … … 334 334 335 335 module->patterns = patterns; 336 module->pattern = calloc( sizeof(trackmod_pattern_t), patterns);336 module->pattern = calloc(patterns, sizeof(trackmod_pattern_t)); 337 337 if (module->pattern == NULL) { 338 338 printf("Out of memory.\n"); … … 343 343 /* Order list */ 344 344 module->ord_list_len = order_list->order_list_len; 345 module->ord_list = calloc( sizeof(size_t), module->ord_list_len);345 module->ord_list = calloc(module->ord_list_len, sizeof(size_t)); 346 346 if (module->ord_list == NULL) { 347 347 printf("Out of memory.\n"); -
uspace/lib/trackmod/xm.c
r1fa6292 r56210a7 66 66 } 67 67 68 module->ord_list = calloc( sizeof(size_t), module->ord_list_len);68 module->ord_list = calloc(module->ord_list_len, sizeof(size_t)); 69 69 if (module->ord_list == NULL) { 70 70 printf("Out of memory.\n"); … … 176 176 int ret; 177 177 178 module->pattern = calloc( sizeof(trackmod_pattern_t), module->patterns);178 module->pattern = calloc(module->patterns, sizeof(trackmod_pattern_t)); 179 179 if (module->pattern == NULL) { 180 180 rc = ENOMEM; … … 208 208 module->pattern[i].rows = rows; 209 209 module->pattern[i].channels = module->channels; 210 module->pattern[i].data = calloc( sizeof(trackmod_cell_t),211 rows * module->channels);210 module->pattern[i].data = calloc(rows * module->channels, 211 sizeof(trackmod_cell_t)); 212 212 213 213 if (module->pattern[i].data == NULL) { -
uspace/srv/vfs/vfs_register.c
r1fa6292 r56210a7 369 369 } 370 370 371 fstypes->fstypes = calloc( sizeof(char *), count);371 fstypes->fstypes = calloc(count, sizeof(char *)); 372 372 if (fstypes->fstypes == NULL) { 373 373 free(fstypes->buf);
Note:
See TracChangeset
for help on using the changeset viewer.