/*
* Emulator
*
- * Copyright (C) 2011, 2012 Samsung Electronics Co., Ltd. All rights reserved.
+ * Copyright (C) 2011 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
*
* Contact:
* SeokYeon Hwang <syeon.hwang@samsung.com>
static int _qemu_argc;
static char **_qemu_argv;
+#if defined(CONFIG_LINUX)
+#include <sys/shm.h>
+extern int g_shmid;
+#endif
+
#ifdef CONFIG_DARWIN
int thread_running = 1; /* Check if we need exit main */
#endif
shutdown_skin_server();
shutdown_guest_server();
+#if defined(CONFIG_LINUX)
+ /* clean up the vm lock memory by munkyu */
+ if (shmctl(g_shmid, IPC_RMID, 0) == -1) {
+ ERR("shmctl failed\n");
+ perror("emulator.c: ");
+ }
+#endif
+
maru_display_fini();
}
/*
* SDL_WINDOWID hack
*
- * Copyright (C) 2011 - 2012 Samsung Electronics Co., Ltd. All rights reserved.
+ * Copyright (C) 2011 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
*
* Contact:
* GiWoong Kim <giwoong.kim@samsung.com>
#include "hw/maru_pm.h"
#include "hw/maru_brightness.h"
#include "debug_ch.h"
-#if defined(CONFIG_LINUX)
-#include <sys/shm.h>
-#endif
/* #include "SDL_opengl.h" */
MULTI_DEBUG_CHANNEL(tizen, maru_sdl);
static int sdl_initialized;
static int sdl_alteration;
-extern int g_shmid;
-extern char *g_shared_memory;
static int sdl_skip_update;
pthread_cond_destroy(&sdl_cond);
#endif
pthread_mutex_destroy(&sdl_mutex);
-
-#if defined(CONFIG_LINUX)
- if (shmctl(g_shmid, IPC_RMID, 0) == -1) {
- ERR("shmctl failed\n");
- perror("maru_sdl.c: ");
- }
-#endif
}
void make_vm_lock_os(void)
{
- int shmid;
- char *shared_memory;
-
- shmid = shmget((key_t)SHMKEY, MAXLEN, 0666|IPC_CREAT);
- if (shmid == -1) {
- ERR("shmget failed\n");
- perror("osutil-darwin: ");
- return;
- }
-
- shared_memory = shmat(shmid, (char *)0x00, 0);
- if (shared_memory == (void *)-1) {
- ERR("shmat failed\n");
- perror("osutil-darwin: ");
- return;
- }
- sprintf(shared_memory, "%d", tizen_base_port + 2);
- INFO("shared memory key: %d, value: %s\n", SHMKEY, (char *)shared_memory);
-
- if (shmdt(shared_memory) == -1) {
- ERR("shmdt failed\n");
- perror("osutil-darwin: ");
- }
+ /* TODO: */
}
void set_bin_path_os(gchar * exec_argv)
void make_vm_lock_os(void)
{
-
g_shmid = shmget((key_t)tizen_base_port, MAXLEN, 0666|IPC_CREAT);
if (g_shmid == -1) {
ERR("shmget failed\n");
+ perror("osutil-linux: ");
return;
}
g_shared_memory = shmat(g_shmid, (char *)0x00, 0);
if (g_shared_memory == (void *)-1) {
ERR("shmat failed\n");
+ perror("osutil-linux: ");
return;
}
+
g_sprintf(g_shared_memory, "%s", tizen_target_img_path);
INFO("shared memory key: %d value: %s\n",
tizen_base_port, (char *)g_shared_memory);
+
+ if (shmdt(g_shared_memory) == -1) {
+ ERR("shmdt failed\n");
+ perror("osutil-linux: ");
+ }
}
void set_bin_path_os(gchar * exec_argv)
char *base_port = NULL;
char *pBuf;
HANDLE hMapFile;
+
for (port = 26100; port < 26200; port += 10) {
base_port = g_strdup_printf("%d", port);
hMapFile = OpenFileMapping(FILE_MAP_READ, TRUE, base_port);
this.imageData = new ImageData(lcdWidth, lcdHeight, COLOR_DEPTH, paletteData);
this.framebuffer = new Image(Display.getDefault(), imageData);
+ setDaemon(true);
setWaitIntervalTime(30);
this.runnable = new Runnable() {
#include <pthread.h>
#include "maruskin_operation.h"
#include "hw/maru_brightness.h"
+#include "hw/maru_virtio_hwkey.h"
#include "maru_display.h"
#include "emulator.h"
#include "debug_ch.h"
#include "target-i386/hax-i386.h"
#endif
-#if defined(CONFIG_USE_SHM) && defined(TARGET_I386)
-#include <sys/shm.h>
-int g_shmid;
-#endif
-
MULTI_DEBUG_CHANNEL(qemu, skin_operation);
INFO("Shutdown qemu !!!\n");
-#if defined(CONFIG_USE_SHM) && defined(TARGET_I386)
- if (shmctl(g_shmid, IPC_RMID, 0) == -1) {
- ERR("shmctl failed\n");
- perror("maruskin_operation.c:g_shmid: ");
- }
-#endif
-
qemu_system_shutdown_request();
return NULL;