Changeset 36e9cd1 in mainline
- Timestamp:
- 2010-02-10T23:15:27Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0701066
- Parents:
- 3149fc0
- Files:
-
- 28 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/macros.h
r3149fc0 r36e9cd1 84 84 #define STRING_ARG(arg) #arg 85 85 86 #define LOWER32(arg) (( arg) & 0xffffffff)87 #define UPPER32(arg) ((( arg) >> 32) & 0xffffffff)86 #define LOWER32(arg) (((uint64_t) (arg)) & 0xffffffff) 87 #define UPPER32(arg) (((((uint64_t) arg)) >> 32) & 0xffffffff) 88 88 89 89 #define MERGE_LOUP32(lo, up) \ -
uspace/app/bdsh/cmds/builtins/builtins.h
r3149fc0 r36e9cd1 10 10 #include "cd/cd_def.h" 11 11 #include "exit/exit_def.h" 12 {NULL, NULL, NULL, NULL }12 {NULL, NULL, NULL, NULL, NULL} 13 13 }; 14 14 -
uspace/app/bdsh/cmds/builtins/cd/cd_def.h
r3149fc0 r36e9cd1 4 4 &cmd_cd, 5 5 &help_cmd_cd, 6 0 6 7 }, -
uspace/app/bdsh/cmds/builtins/exit/exit_def.h
r3149fc0 r36e9cd1 4 4 &cmd_exit, 5 5 &help_cmd_exit, 6 0 6 7 }, -
uspace/app/bdsh/input.c
r3149fc0 r36e9cd1 508 508 { 509 509 int sa, sb; 510 wchar_t tmp_c;511 510 char *str; 512 511 … … 514 513 515 514 if (sb < ti->nc) { 516 tmp_c = ti->buffer[sb];515 wchar_t tmp_c = ti->buffer[sb]; 517 516 ti->buffer[sb] = '\0'; 518 } 519 520 str = wstr_to_astr(ti->buffer + sa); 521 522 if (sb < ti->nc) 517 str = wstr_to_astr(ti->buffer + sa); 523 518 ti->buffer[sb] = tmp_c; 524 519 } else 520 str = wstr_to_astr(ti->buffer + sa); 521 525 522 if (str == NULL) 526 523 goto error; -
uspace/app/edit/edit.c
r3149fc0 r36e9cd1 718 718 wchar_t c; 719 719 size_t pos, size; 720 unsigneds_column;720 int s_column; 721 721 coord_t csel_start, csel_end, ctmp; 722 722 … … 766 766 s_column = pane.sh_column; 767 767 while (pos < size) { 768 if ( csel_start.row == rbc.row && csel_start.column == s_column) {768 if ((csel_start.row == rbc.row) && (csel_start.column == s_column)) { 769 769 fflush(stdout); 770 770 console_set_color(con, COLOR_BLACK, COLOR_RED, 0); … … 772 772 } 773 773 774 if ( csel_end.row == rbc.row && csel_end.column == s_column) {774 if ((csel_end.row == rbc.row) && (csel_end.column == s_column)) { 775 775 fflush(stdout); 776 776 console_set_color(con, COLOR_BLACK, COLOR_WHITE, 0); … … 792 792 } 793 793 794 if ( csel_end.row == rbc.row && csel_end.column == s_column) {794 if ((csel_end.row == rbc.row) && (csel_end.column == s_column)) { 795 795 fflush(stdout); 796 796 console_set_color(con, COLOR_BLACK, COLOR_WHITE, 0); -
uspace/app/mkfat/fat.h
r3149fc0 r36e9cd1 78 78 uint16_t signature; 79 79 } __attribute__ ((packed)); 80 struct fat32{80 struct { 81 81 /* FAT32 only */ 82 82 /** Sectors per FAT. */ … … 108 108 /** Signature. */ 109 109 uint16_t signature; 110 } __attribute__ ((packed));110 } fat32 __attribute__ ((packed)); 111 111 }; 112 112 } __attribute__ ((packed)) fat_bs_t; -
uspace/app/redir/redir.c
r3149fc0 r36e9cd1 72 72 static task_id_t spawn(int argc, char *argv[]) 73 73 { 74 char **args = (char * ) calloc(argc + 1, sizeof(char *));74 char **args = (char **) calloc(argc + 1, sizeof(char *)); 75 75 if (!args) { 76 76 printf("No memory available\n"); -
uspace/app/taskdump/taskdump.c
r3149fc0 r36e9cd1 356 356 } 357 357 358 static int area_dump(as_area_info_t *area)358 static __attribute__((unused)) int area_dump(as_area_info_t *area) 359 359 { 360 360 size_t to_copy; -
uspace/app/tester/fault/fault2.c
r3149fc0 r36e9cd1 30 30 #include "../tester.h" 31 31 32 typedef int __attribute__((may_alias)) aliasing_int; 33 32 34 char *test_fault2(void) 33 35 { … … 35 37 volatile int var1; 36 38 37 var1 = *(( int *) (((char *) (&var)) + 1));39 var1 = *((aliasing_int *) (((char *) (&var)) + 1)); 38 40 39 41 return "Survived unaligned read"; -
uspace/lib/libc/arch/ia64/include/ddi.h
r3149fc0 r36e9cd1 39 39 #include <libarch/types.h> 40 40 41 #define IO_SPACE_BOUNDARY ( 64 * 1024)41 #define IO_SPACE_BOUNDARY ((void *) (64 * 1024)) 42 42 43 43 uint64_t get_ia64_iospace_address(void); -
uspace/lib/libc/arch/sparc64/include/ddi.h
r3149fc0 r36e9cd1 37 37 #include <libarch/types.h> 38 38 39 static inline memory_barrier(void)39 static inline void memory_barrier(void) 40 40 { 41 asm volatile ("membar #LoadLoad | #StoreStore\n" ::: "memory"); 41 asm volatile ( 42 "membar #LoadLoad | #StoreStore\n" 43 ::: "memory" 44 ); 42 45 } 43 46 -
uspace/lib/libc/arch/sparc64/include/fibril.h
r3149fc0 r36e9cd1 48 48 STACK_ALIGNMENT) - (STACK_BIAS + SP_DELTA); \ 49 49 (c)->fp = -STACK_BIAS; \ 50 (c)->tp = ptls; \50 (c)->tp = (uint64_t) ptls; \ 51 51 } while (0) 52 52 -
uspace/lib/libc/generic/clipboard.c
r3149fc0 r36e9cd1 148 148 aid_t req = async_send_1(clip_phone, CLIPBOARD_GET_DATA, tag, NULL); 149 149 rc = async_data_read_start(clip_phone, (void *) sbuf, size); 150 if ( rc == EOVERFLOW) {150 if ((int) rc == EOVERFLOW) { 151 151 /* 152 152 * The data in the clipboard has changed since -
uspace/lib/libc/generic/fibril.c
r3149fc0 r36e9cd1 41 41 #include <unistd.h> 42 42 #include <stdio.h> 43 #include <arch/barrier.h> 43 44 #include <libarch/faddr.h> 44 45 #include <futex.h> … … 133 134 int fibril_switch(fibril_switch_type_t stype) 134 135 { 135 fibril_t *srcf, *dstf;136 136 int retval = 0; 137 137 138 138 futex_down(&fibril_futex); 139 139 140 140 if (stype == FIBRIL_PREEMPT && list_empty(&ready_list)) 141 141 goto ret_0; 142 142 143 143 if (stype == FIBRIL_FROM_MANAGER) { 144 if ( list_empty(&ready_list) && list_empty(&serialized_list))144 if ((list_empty(&ready_list)) && (list_empty(&serialized_list))) 145 145 goto ret_0; 146 146 147 /* 147 148 * Do not preempt if there is not enough threads to run the 148 149 * ready fibrils which are not serialized. 149 150 */ 150 if ( list_empty(&serialized_list) &&151 threads_in_manager <= serialized_threads) {151 if ((list_empty(&serialized_list)) && 152 (threads_in_manager <= serialized_threads)) { 152 153 goto ret_0; 153 154 } 154 155 } 156 155 157 /* If we are going to manager and none exists, create it */ 156 if ( stype == FIBRIL_TO_MANAGER || stype == FIBRIL_FROM_DEAD) {158 if ((stype == FIBRIL_TO_MANAGER) || (stype == FIBRIL_FROM_DEAD)) { 157 159 while (list_empty(&manager_list)) { 158 160 futex_up(&fibril_futex); … … 162 164 } 163 165 164 srcf = __tcb_get()->fibril_data;166 fibril_t *srcf = __tcb_get()->fibril_data; 165 167 if (stype != FIBRIL_FROM_DEAD) { 168 166 169 /* Save current state */ 167 170 if (!context_save(&srcf->ctx)) { 168 171 if (serialization_count) 169 172 srcf->flags &= ~FIBRIL_SERIALIZED; 173 170 174 if (srcf->clean_after_me) { 171 175 /* … … 173 177 * restored context here. 174 178 */ 175 void *stack = srcf->clean_after_me->stack; 179 void *stack = srcf->clean_after_me->stack; 176 180 if (stack) { 177 181 /* … … 188 192 srcf->clean_after_me = NULL; 189 193 } 194 190 195 return 1; /* futex_up already done here */ 191 196 } 192 197 193 198 /* Save myself to the correct run list */ 194 199 if (stype == FIBRIL_PREEMPT) … … 197 202 list_append(&srcf->link, &manager_list); 198 203 threads_in_manager--; 199 } else { 204 } else { 200 205 /* 201 206 * If stype == FIBRIL_TO_MANAGER, don't put ourselves to … … 206 211 } 207 212 213 /* Avoid srcf being clobbered by context_save() */ 214 srcf = __tcb_get()->fibril_data; 215 208 216 /* Choose a new fibril to run */ 209 if (stype == FIBRIL_TO_MANAGER || stype == FIBRIL_FROM_DEAD) { 217 fibril_t *dstf; 218 if ((stype == FIBRIL_TO_MANAGER) || (stype == FIBRIL_FROM_DEAD)) { 210 219 dstf = list_get_instance(manager_list.next, fibril_t, link); 211 220 if (serialization_count && stype == FIBRIL_TO_MANAGER) { … … 214 223 } 215 224 threads_in_manager++; 216 225 217 226 if (stype == FIBRIL_FROM_DEAD) 218 227 dstf->clean_after_me = srcf; … … 228 237 } 229 238 list_remove(&dstf->link); 230 239 231 240 futex_up(&fibril_futex); 232 241 context_restore(&dstf->ctx); 233 242 /* not reached */ 234 243 235 244 ret_0: 236 245 futex_up(&fibril_futex); -
uspace/lib/libc/generic/ipc.c
r3149fc0 r36e9cd1 728 728 int *flags) 729 729 { 730 int res; 731 sysarg_t tmp_flags; 732 res = ipc_call_sync_3_2(phoneid, IPC_M_SHARE_IN, (ipcarg_t) dst, 730 sysarg_t tmp_flags = 0; 731 int res = ipc_call_sync_3_2(phoneid, IPC_M_SHARE_IN, (ipcarg_t) dst, 733 732 (ipcarg_t) size, arg, NULL, &tmp_flags); 733 734 734 if (flags) 735 735 *flags = tmp_flags; 736 736 737 return res; 737 738 } -
uspace/lib/libc/include/macros.h
r3149fc0 r36e9cd1 48 48 #define STRING_ARG(arg) #arg 49 49 50 #define LOWER32(arg) (( arg) & 0xffffffff)51 #define UPPER32(arg) ((( arg) >> 32) & 0xffffffff)50 #define LOWER32(arg) (((uint64_t) (arg)) & 0xffffffff) 51 #define UPPER32(arg) (((((uint64_t) arg)) >> 32) & 0xffffffff) 52 52 53 53 #define MERGE_LOUP32(lo, up) \ -
uspace/srv/bd/ata_bd/ata_bd.c
r3149fc0 r36e9cd1 500 500 501 501 d = &disk[disk_id]; 502 bc.h = 0; /* Silence warning. */ 502 503 /* Silence warning. */ 504 memset(&bc, 0, sizeof(bc)); 503 505 504 506 /* Compute block coordinates. */ … … 574 576 575 577 d = &disk[disk_id]; 576 bc.h = 0; /* Silence warning. */ 578 579 /* Silence warning. */ 580 memset(&bc, 0, sizeof(bc)); 577 581 578 582 /* Compute block coordinates. */ -
uspace/srv/hid/console/gcons.c
r3149fc0 r36e9cd1 448 448 449 449 int pm = make_pixmap(_binary_gfx_anim_1_ppm_start, 450 ( int) &_binary_gfx_anim_1_ppm_size);450 (size_t) &_binary_gfx_anim_1_ppm_size); 451 451 async_msg_2(fbphone, FB_ANIM_ADDPIXMAP, an, pm); 452 452 453 453 pm = make_pixmap(_binary_gfx_anim_2_ppm_start, 454 ( int) &_binary_gfx_anim_2_ppm_size);454 (size_t) &_binary_gfx_anim_2_ppm_size); 455 455 async_msg_2(fbphone, FB_ANIM_ADDPIXMAP, an, pm); 456 456 457 457 pm = make_pixmap(_binary_gfx_anim_3_ppm_start, 458 ( int) &_binary_gfx_anim_3_ppm_size);458 (size_t) &_binary_gfx_anim_3_ppm_size); 459 459 async_msg_2(fbphone, FB_ANIM_ADDPIXMAP, an, pm); 460 460 461 461 pm = make_pixmap(_binary_gfx_anim_4_ppm_start, 462 ( int) &_binary_gfx_anim_4_ppm_size);462 (size_t) &_binary_gfx_anim_4_ppm_size); 463 463 async_msg_2(fbphone, FB_ANIM_ADDPIXMAP, an, pm); 464 464 -
uspace/srv/hid/fb/serial_console.c
r3149fc0 r36e9cd1 57 57 void serial_putchar(wchar_t ch); 58 58 59 static int scr_width;60 static int scr_height;59 static unsigned int scr_width; 60 static unsigned int scr_height; 61 61 static bool color = true; /** True if producing color output. */ 62 62 static bool utf8 = false; /** True if producing UTF8 output. */ … … 108 108 void serial_putchar(wchar_t ch) 109 109 { 110 uint8_tbuf[STR_BOUNDS(1)];110 char buf[STR_BOUNDS(1)]; 111 111 size_t offs; 112 112 size_t i; … … 294 294 } 295 295 296 int lastcol = 0;297 int lastrow = 0;296 unsigned int lastcol = 0; 297 unsigned int lastrow = 0; 298 298 299 299 /** … … 309 309 310 310 wchar_t c; 311 int col, row, w, h; 311 unsigned int col; 312 unsigned int row; 313 unsigned int w; 314 unsigned int h; 312 315 int i; 313 316 … … 358 361 break; 359 362 } 360 if ( col + w > scr_width || row + h > scr_height) {363 if ((col + w > scr_width) || (row + h > scr_height)) { 361 364 retval = EINVAL; 362 365 break; … … 424 427 case FB_SCROLL: 425 428 i = IPC_GET_ARG1(call); 426 if ((i > scr_height) || (i < -scr_height)) {429 if ((i > (int) scr_height) || (i < -((int) scr_height))) { 427 430 retval = EINVAL; 428 431 break; -
uspace/srv/hid/kbd/port/msim.c
r3149fc0 r36e9cd1 64 64 { 65 65 async_set_interrupt_received(msim_irq_handler); 66 msim_cmds[0].addr = sysinfo_value("kbd.address.virtual");66 msim_cmds[0].addr = (void *) sysinfo_value("kbd.address.virtual"); 67 67 ipc_register_irq(sysinfo_value("kbd.inr"), device_assign_devno(), 68 68 0, &msim_kbd); -
uspace/srv/hid/kbd/port/ns16550.c
r3149fc0 r36e9cd1 107 107 } 108 108 109 void ns16550_port_yield(void)110 {111 }112 113 void ns16550_port_reclaim(void)114 {115 }116 117 109 static void ns16550_irq_handler(ipc_callid_t iid, ipc_call_t *call) 118 110 { -
uspace/srv/hid/kbd/port/sgcn.c
r3149fc0 r36e9cd1 92 92 93 93 /* polling thread */ 94 static void *sgcn_thread_impl(void *arg);94 static void sgcn_thread_impl(void *arg); 95 95 96 96 static volatile bool polling_disabled = false; … … 167 167 * Thread to poll SGCN for keypresses. 168 168 */ 169 static void *sgcn_thread_impl(void *arg)169 static void sgcn_thread_impl(void *arg) 170 170 { 171 171 (void) arg; -
uspace/srv/hid/kbd/port/ski.c
r3149fc0 r36e9cd1 49 49 #define POLL_INTERVAL 10000 50 50 51 static void *ski_thread_impl(void *arg);51 static void ski_thread_impl(void *arg); 52 52 static int32_t ski_getchar(void); 53 53 … … 84 84 85 85 /** Thread to poll Ski for keypresses. */ 86 static void *ski_thread_impl(void *arg)86 static void ski_thread_impl(void *arg) 87 87 { 88 88 int32_t c; -
uspace/srv/hid/kbd/port/z8530.c
r3149fc0 r36e9cd1 96 96 } 97 97 98 void z8530_port_yield(void)99 {100 }101 102 void z8530_port_reclaim(void)103 {104 }105 106 98 static void z8530_irq_handler(ipc_callid_t iid, ipc_call_t *call) 107 99 { -
uspace/srv/hw/bus/cuda_adb/cuda_adb.c
r3149fc0 r36e9cd1 55 55 static void cuda_connection(ipc_callid_t iid, ipc_call_t *icall); 56 56 static int cuda_init(void); 57 static int cuda_claim(void);58 57 static void cuda_irq_handler(ipc_callid_t iid, ipc_call_t *call); 59 58 -
uspace/srv/loader/main.c
r3149fc0 r36e9cd1 241 241 * Allocate new filv 242 242 */ 243 fdi_node_t **_filv = (fdi_node_t * ) malloc((count + 1) *sizeof(fdi_node_t *));243 fdi_node_t **_filv = (fdi_node_t **) calloc(count + 1, sizeof(fdi_node_t *)); 244 244 if (_filv == NULL) { 245 245 free(buf); -
uspace/srv/vfs/vfs.c
r3149fc0 r36e9cd1 72 72 ipc_call_t call; 73 73 ipc_callid_t callid = async_get_call(&call); 74 75 fs_handle_t fs_handle;76 int phone;77 74 78 75 switch (IPC_GET_METHOD(call)) {
Note:
See TracChangeset
for help on using the changeset viewer.