Changeset 3558ba93 in mainline
- Timestamp:
- 2013-12-09T15:55:40Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5b89d43b
- Parents:
- 12735849 (diff), 9521eca (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. - Files:
-
- 10 added
- 19 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
boot/Makefile
r12735849 r3558ba93 80 80 cp "$(USPACE_PATH)/$(DRVS_PATH)/$$file_dir/$$file_name/$$file_name.dev" "$(DIST_PATH)/$(DRVS_PATH)/$$file_name/" ; \ 81 81 done 82 if ls $(DIST_OVERLAY_PATH)/* >/dev/null; then \ 83 cp -r -L $(DIST_OVERLAY_PATH)/* "$(DIST_PATH)"; \ 84 fi 82 85 83 86 clean: clean_dist -
boot/Makefile.common
r12735849 r3558ba93 48 48 USPACE_PATH = $(ROOT_PATH)/uspace 49 49 DIST_PATH = $(USPACE_PATH)/dist 50 DIST_OVERLAY_PATH = $(USPACE_PATH)/overlay 50 51 TOOLS_PATH = $(ROOT_PATH)/tools 51 52 DRVS_PATH = drv … … 205 206 $(USPACE_PATH)/app/sysinfo/sysinfo \ 206 207 $(USPACE_PATH)/app/top/top \ 208 $(USPACE_PATH)/app/untar/untar \ 207 209 $(USPACE_PATH)/app/usbinfo/usbinfo \ 208 210 $(USPACE_PATH)/app/vuhid/vuh \ -
uspace/Makefile
r12735849 r3558ba93 68 68 app/trace \ 69 69 app/top \ 70 app/untar \ 70 71 app/usbinfo \ 71 72 app/vuhid \ -
uspace/app/tester/Makefile
r12735849 r3558ba93 37 37 util.c \ 38 38 thread/thread1.c \ 39 thread/setjmp1.c \ 39 40 print/print1.c \ 40 41 print/print2.c \ -
uspace/app/tester/tester.c
r12735849 r3558ba93 48 48 test_t tests[] = { 49 49 #include "thread/thread1.def" 50 #include "thread/setjmp1.def" 50 51 #include "print/print1.def" 51 52 #include "print/print2.def" -
uspace/app/tester/tester.h
r12735849 r3558ba93 39 39 #include <stdbool.h> 40 40 #include <stacktrace.h> 41 #include <stdio.h> 41 42 42 43 #define IPC_TEST_SERVICE 10240 … … 80 81 81 82 extern const char *test_thread1(void); 83 extern const char *test_setjmp1(void); 82 84 extern const char *test_print1(void); 83 85 extern const char *test_print2(void); -
uspace/app/untar/Makefile
r12735849 r3558ba93 1 1 # 2 # Copyright (c) 20 08 Josef Cejka2 # Copyright (c) 2013 Vojtech Horky 3 3 # All rights reserved. 4 4 # … … 27 27 # 28 28 29 #include <libarch/context_offset.h> 29 USPACE_PREFIX = ../.. 30 BINARY = untar 30 31 31 .text 32 .global setjmp 33 .global longjmp 32 SOURCES = \ 33 main.c \ 34 tar.c 34 35 35 .type setjmp,@function 36 setjmp: 37 movl 0(%esp), %eax # save pc value into eax 38 movl 4(%esp), %edx # address of the jmp_buf structure to save context to 39 40 # save registers to the jmp_buf structure 41 CONTEXT_SAVE_ARCH_CORE %edx %eax 42 43 xorl %eax, %eax # set_jmp returns 0 44 ret 45 46 .type longjmp,@function 47 longjmp: 48 movl 4(%esp), %ecx # put address of jmp_buf into ecx 49 movl 8(%esp), %eax # put return value into eax 50 51 # restore registers from the jmp_buf structure 52 CONTEXT_RESTORE_ARCH_CORE %ecx %edx 53 54 movl %edx, 0(%esp) # put saved pc on stack 55 ret 36 include $(USPACE_PREFIX)/Makefile.common -
uspace/dist/src/c/demos/tetris/screen.c
r12735849 r3558ba93 344 344 345 345 while (timeout > 0) { 346 kbd_event_t event;347 348 if (!console_get_ kbd_event_timeout(console, &event, &timeout))346 cons_event_t event; 347 348 if (!console_get_event_timeout(console, &event, &timeout)) 349 349 break; 350 350 } … … 376 376 377 377 while (c == 0) { 378 kbd_event_t event;379 380 if (!console_get_ kbd_event_timeout(console, &event, &timeleft)) {378 cons_event_t event; 379 380 if (!console_get_event_timeout(console, &event, &timeleft)) { 381 381 timeleft = 0; 382 382 return -1; 383 383 } 384 384 385 if (event.type == KEY_PRESS)386 c = event. c;385 if (event.type == CEV_KEY && event.ev.key.type == KEY_PRESS) 386 c = event.ev.key.c; 387 387 } 388 388 … … 398 398 399 399 while (c == 0) { 400 kbd_event_t event;401 402 if (!console_get_ kbd_event(console, &event))400 cons_event_t event; 401 402 if (!console_get_event(console, &event)) 403 403 return -1; 404 404 405 if (event.type == KEY_PRESS)406 c = event. c;405 if (event.type == CEV_KEY && event.ev.key.type == KEY_PRESS) 406 c = event.ev.key.c; 407 407 } 408 408 -
uspace/lib/c/Makefile
r12735849 r3558ba93 61 61 generic/bd.c \ 62 62 generic/bd_srv.c \ 63 generic/bitops.c \64 63 generic/cap.c \ 65 64 generic/cfg.c \ … … 143 142 generic/net/socket_client.c \ 144 143 generic/net/socket_parse.c \ 144 generic/setjmp.c \ 145 145 generic/stack.c \ 146 146 generic/stacktrace.c \ -
uspace/lib/c/arch/amd64/_link.ld.in
r12735849 r3558ba93 39 39 .data : { 40 40 *(.data); 41 *(.data.rel*); 41 42 } :data 42 43 -
uspace/lib/c/arch/ia32/Makefile.inc
r12735849 r3558ba93 34 34 arch/$(UARCH)/src/fibril.S \ 35 35 arch/$(UARCH)/src/tls.c \ 36 arch/$(UARCH)/src/setjmp.S \37 36 arch/$(UARCH)/src/stacktrace.c \ 38 37 arch/$(UARCH)/src/stacktrace_asm.S \ -
uspace/lib/c/include/bitops.h
r12735849 r3558ba93 107 107 } 108 108 109 extern int __popcountsi2(int);110 111 109 #endif 112 110 -
uspace/lib/c/include/setjmp.h
r12735849 r3558ba93 1 1 /* 2 2 * Copyright (c) 2008 Josef Cejka 3 * Copyright (c) 2013 Vojtech Horky 3 4 * All rights reserved. 4 5 * … … 30 31 * @{ 31 32 */ 32 /** @file 33 /** @file Long jump implementation. 34 * 35 * Implementation inspired by Jiri Zarevucky's code from 36 * http://bazaar.launchpad.net/~zarevucky-jiri/helenos/stdc/revision/1544/uspace/lib/posix/setjmp.h 33 37 */ 34 38 … … 38 42 #include <libarch/fibril.h> 39 43 40 typedef context_t jmp_buf[1]; 44 struct jmp_buf_interal { 45 context_t context; 46 int return_value; 47 }; 48 typedef struct jmp_buf_interal jmp_buf[1]; 41 49 42 extern int setjmp(jmp_buf env); 50 /* 51 * Specified as extern to minimize number of included headers 52 * because this file is used as is in libposix too. 53 */ 54 extern int context_save(context_t *ctx) __attribute__((returns_twice)); 55 56 /** 57 * Save current environment (registers). 58 * 59 * This function may return twice. 60 * 61 * @param env Variable where to save the environment (of type jmp_buf). 62 * @return Whether the call returned after longjmp. 63 * @retval 0 Environment was saved, normal execution. 64 * @retval other longjmp was executed and returned here. 65 */ 66 #define setjmp(env) \ 67 ((env)[0].return_value = 0, \ 68 context_save(&(env)[0].context), \ 69 (env)[0].return_value) 70 43 71 extern void longjmp(jmp_buf env, int val) __attribute__((noreturn)); 44 72 -
uspace/lib/posix/include/posix/float.h
r12735849 r3558ba93 59 59 #undef DBL_EPSILON 60 60 #define DBL_EPSILON __DBL_EPSILON__ 61 #undef LDBL_EPSILON 62 #define LDBL_EPSILON __LDBL_EPSILON__ 61 63 #undef FLT_RADIX 62 64 #define FLT_RADIX __FLT_RADIX__ … … 69 71 #undef FLT_MANT_DIG 70 72 #define FLT_MANT_DIG __FLT_MANT_DIG__ 73 #undef LDBL_MIN 74 #define LDBL_MIN __LDBL_MIN__ 75 #undef LDBL_MAX 76 #define LDBL_MAX __LDBL_MAX__ 71 77 #undef LDBL_MANT_DIG 72 78 #define LDBL_MANT_DIG __LDBL_MANT_DIG__ -
uspace/lib/posix/include/posix/setjmp.h
r12735849 r3558ba93 27 27 */ 28 28 29 /** @addtogroup lib c29 /** @addtogroup libposix 30 30 * @{ 31 31 */ 32 32 33 #include <bitops.h> 34 35 int __popcountsi2(int a) 36 { 37 int bits = 0; 38 for (unsigned int i = 0; i < sizeof(a) * 8; i++) { 39 if (((a >> i) & 1) != 0) { 40 bits++; 41 } 42 } 43 return bits; 44 } 45 33 /* 34 * Just a pass-through to libc setjmp. 35 */ 36 #include "libc/setjmp.h" 46 37 47 38 /** @} -
uspace/lib/posix/include/posix/stdlib.h
r12735849 r3558ba93 56 56 #define _Exit exit 57 57 extern int __POSIX_DEF__(atexit)(void (*func)(void)); 58 extern void exit(int status) ;58 extern void exit(int status) __attribute__((noreturn)); 59 59 extern void abort(void) __attribute__((noreturn)); 60 60 -
uspace/lib/softfloat/softfloat.c
r12735849 r3558ba93 1265 1265 } 1266 1266 1267 float __aeabi_d2f(double a) 1268 { 1269 return __truncdfsf2(a); 1270 } 1271 1272 double __aeabi_f2d(float a) 1273 { 1274 return __extendsfdf2(a); 1275 } 1276 1277 1267 1278 float __aeabi_i2f(int i) 1268 1279 { … … 1285 1296 } 1286 1297 1298 double __aeabi_l2d(long long i) 1299 { 1300 return __floattidf(i); 1301 } 1302 1303 float __aeabi_l2f(long long i) 1304 { 1305 return __floattisf(i); 1306 } 1307 1308 float __aeabi_ul2f(unsigned long long u) 1309 { 1310 return __floatuntisf(u); 1311 } 1312 1287 1313 int __aeabi_f2iz(float a) 1288 1314 { … … 1305 1331 } 1306 1332 1333 long long __aeabi_d2lz(double a) 1334 { 1335 return __fixdfti(a); 1336 } 1337 1307 1338 int __aeabi_fcmpge(float a, float b) 1308 1339 { … … 1339 1370 return __ltdf2(a, b); 1340 1371 } 1372 1373 int __aeabi_dcmple(double a, double b) 1374 { 1375 return __ledf2(a, b); 1376 } 1377 1341 1378 1342 1379 int __aeabi_dcmpeq(double a, double b) -
uspace/lib/softfloat/softfloat.h
r12735849 r3558ba93 204 204 205 205 /* ARM EABI */ 206 extern float __aeabi_d2f(double); 207 extern double __aeabi_f2d(float); 206 208 extern float __aeabi_i2f(int); 207 209 extern float __aeabi_ui2f(int); 208 210 extern double __aeabi_i2d(int); 209 211 extern double __aeabi_ui2d(unsigned int); 212 extern double __aeabi_l2d(long long); 213 extern float __aeabi_l2f(long long); 214 extern float __aeabi_ul2f(unsigned long long); 210 215 extern unsigned int __aeabi_d2uiz(double); 216 extern long long __aeabi_d2lz(double); 211 217 212 218 extern int __aeabi_f2iz(float); … … 222 228 extern int __aeabi_dcmpgt(double, double); 223 229 extern int __aeabi_dcmplt(double, double); 230 extern int __aeabi_dcmple(double, double); 224 231 extern int __aeabi_dcmpeq(double, double); 225 232 -
uspace/lib/softint/Makefile
r12735849 r3558ba93 35 35 36 36 SOURCES = \ 37 generic/bits.c \ 37 38 generic/comparison.c \ 38 39 generic/division.c \ -
uspace/lib/softint/generic/shift.c
r12735849 r3558ba93 123 123 } 124 124 125 long long __aeabi_llsl(long long val, int shift) 126 { 127 return __ashldi3(val, shift); 128 } 129 125 130 /** @} 126 131 */ -
uspace/lib/softint/include/shift.h
r12735849 r3558ba93 46 46 extern long long __lshrdi3(long long, int); 47 47 48 49 /* ARM EABI */ 50 extern long long __aeabi_llsl(long long, int); 51 48 52 #endif 49 53
Note:
See TracChangeset
for help on using the changeset viewer.