Commit graph

42 commits

Author SHA1 Message Date
Stefan Hajnoczi 7ff5f05c82
bitmap: add atomic set functions
Use atomic_or() for atomic bitmaps where several threads may set bits at
the same time. This avoids the race condition between threads loading
an element, bitwise ORing, and then storing the element.

When setting all bits in a word we can avoid atomic ops and instead just
use an smp_mb() at the end.

Most bitmap users don't need atomicity so introduce new functions.

Backports commit 9f02cfc84b85929947b32fe1674fbc6a429f332a from qemu
2018-02-13 09:59:30 -05:00
xorstream 8e45102b43 Arm support ported. (#736)
* Fix for MIPS issue.

* Sparc support added.

* M68K support added.

* Arm support ported.

* Fix issue with VS2015 shlobj.h file
2017-01-23 23:30:57 +08:00
Nguyen Anh Quynh 0d51163abc cleanup qemu/util/qemu-timer-common.c 2017-01-21 14:55:35 +08:00
Nguyen Anh Quynh c8550b86f0 fix conflicts 2017-01-21 11:06:05 +08:00
xorstream 770c5616e2 Automated leading tab to spaces conversion. 2017-01-21 12:28:22 +11:00
xorstream fac6a66860 platform.h move #3 2017-01-21 00:13:21 +11:00
xorstream 1aaf57ca54 Some more little edits to prepare for pull request. 2017-01-20 22:46:32 +11:00
xorstream b0ae2138fb Merge remote-tracking branch 'unicorn-engine/master' into msvc_native 2017-01-20 22:37:51 +11:00
Nguyen Anh Quynh 6daa8581cd win32_start_routine() looks broken. TODO 2017-01-20 16:12:49 +08:00
xorstream ee294eebb0 Fixed double free in win32 threads and changed free() to g_free(). (#722) 2017-01-20 16:03:35 +08:00
Nguyen Anh Quynh c6de7930c9 remove mutex code 2017-01-20 15:44:03 +08:00
xorstream 92392e0f57 Merge with current master. 2017-01-20 18:22:28 +11:00
xorstream 002151874a Unicorn interface working with test app in 32bit and 64bit builds. 2017-01-20 17:27:22 +11:00
xorstream 1aeaf5c40d This code should now build the x86_x64-softmmu part 2. 2017-01-19 22:50:28 +11:00
Nguyen Anh Quynh a154b251e3 cleanup 2017-01-19 12:18:46 +08:00
Nguyen Anh Quynh 7512ff57de more cleanup 2017-01-10 16:29:47 +08:00
Nguyen Anh Quynh c1f39c3db2 cleanup qemu/util code 2017-01-10 12:57:12 +08:00
Nguyen Anh Quynh af165d254c clean all qobject json code 2017-01-09 16:09:53 +08:00
Nguyen Anh Quynh 16894fdb6c cleanup some qemu/util code 2017-01-09 15:48:21 +08:00
Nguyen Anh Quynh 52cb0ba78e cleanup more synchronization code 2017-01-09 14:05:39 +08:00
Nguyen Anh Quynh d7ead1135d cleanup 2017-01-09 13:28:28 +08:00
Nguyen Anh Quynh 520f335a2a glib_compat: lift string functions from glib. remove unused API g_win32_error_message() 2016-12-26 22:36:47 +08:00
Chris Eagle fccbcfd4c2 revert to use of g_free to make future qemu integrations easier (#695)
* revert to use of g_free to make future qemu integrations easier

* bracing
2016-12-21 22:28:36 +08:00
Nguyen Anh Quynh b680ee11f8 Revert "remove qemu/util/qemu-timer-common.c"
This reverts commit 934fa2c90f.
2016-12-19 20:30:46 +08:00
Nguyen Anh Quynh 5f81c00559 Merge branch 'noglib' of https://github.com/cseagle/unicorn into cseagle-noglib 2016-12-19 17:32:27 +08:00
Nguyen Anh Quynh 934fa2c90f remove qemu/util/qemu-timer-common.c 2016-12-19 17:29:25 +08:00
Chris Eagle e46545f722 remove glib dependency by provide compatible replacements 2016-12-18 14:56:58 -08:00
Nguyen Anh Quynh e1b65a6edb cleanup unused code 2016-11-19 23:48:23 +08:00
Nguyen Anh Quynh 72ba554738 qemu_thread_join() takes only 1 arg 2016-04-23 10:17:04 +08:00
Nguyen Anh Quynh 3a742fb6f6 fix conflicts when merging no-thread to master 2016-04-23 10:06:57 +08:00
Chris Eagle 9467254fc0 strip out per cpu thread code 2016-03-25 17:24:28 -07:00
Nguyen Anh Quynh 20b01a6933 fix merge conflict 2016-02-01 12:08:38 +08:00
Willi Ballenthin a640b76b94 qemu-thread-posix: bail on mutex errors
partially addresses #400
2016-01-24 22:46:13 -05:00
petevine 8db7f79daf Finish adding getauxval 2016-01-18 12:48:49 +01:00
petevine 1bf85461c2 Add getauxval.c back 2016-01-18 12:47:32 +01:00
farmdve 036763d6ae Fix memory leaks as reported by DrMemory and Valgrind.
ARM and probably the rest of the arches have significant memory leaks as
they have no release interface.

Additionally, DrMemory does not have 64-bit support and thus I can't
test the 64-bit version under Windows. Under Linux valgrind supports
both 32-bit and 64-bit but there are different macros and code for Linux
and Windows.
2016-01-08 01:42:56 +02:00
Hiroyuki Uekawa 6445c80b29 Build for Cygwin 2015-12-20 22:00:35 +09:00
Nguyen Anh Quynh 2f297bdd3a handle some errors properly so avoid exit() during initialization. this fixes issue #237 2015-11-12 01:43:41 +08:00
Nguyen Anh Quynh 272293556a do not abort() when memory is insufficient. this fixes issue #244 2015-11-10 11:44:29 +08:00
Nguyen Anh Quynh 2d9db36a2b fix some errors introduced by the last commit on qemu-thread-win32.c 2015-09-02 01:34:23 -07:00
Nguyen Anh Quynh 8b39ec5b0c initial support to remove a static variable in qemu-thread-win32.c 2015-09-02 16:13:12 +08:00
Nguyen Anh Quynh 344d016104 import 2015-08-21 15:04:50 +08:00