summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Judson Rosen2017-03-27 00:48:02 -0400
committerJoshua Judson Rosen2017-03-28 22:07:50 -0400
commit4788c2a4a10ef9a1d92bf353f9ed306afb355f5a (patch)
tree24e93b573d37cce9472c48edaee3e024a2be74e2
parentInvert GTK+/guile thread relationship (diff)
downloadgnurobots-4788c2a4a10ef9a1d92bf353f9ed306afb355f5a.tar.gz
Drop unnecessary spinlock (loading, ploading)
After some of the restructuring that was involved in the inversion of the GTK+/guile threads, these variables are no longer needed. Though note that we do actually still busywait specifically on creation of the map.
-rw-r--r--src/main.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/main.c b/src/main.c
index f8ea6d4..0ce89a8 100644
--- a/src/main.c
+++ b/src/main.c
@@ -50,8 +50,6 @@ GRobot *robot = NULL; /* The current robot */
UIWindow *ui;
UIArena *arena;
Map *map = NULL;
-gboolean loading = TRUE;
-volatile gboolean *ploading = &loading;
gpointer callback_scm(gpointer data);
void gui_init();
@@ -313,9 +311,6 @@ void main_prog(void *closure, gint argc, gchar *argv[])
MAP_SET_OBJECT(map, G_ROBOT_POSITION_Y(robot),
G_ROBOT_POSITION_X(robot), ROBOT);
- g_printf("Loading GTK Interface ... Please wait\n\n");
- while(*ploading);
-
/* Now initialize the rest of the Robot properties */
g_object_set(G_OBJECT(robot),
"user-interface", G_OBJECT(arena), "map", G_OBJECT(map), NULL);
@@ -375,8 +370,6 @@ void gui_main()
ui_arena_update_status(arena, "Welcome to GNU Robots",
robot->energy, robot->score, robot->shields);
- *ploading = FALSE;
-
gtk_main();
gdk_threads_leave();
}