From 4788c2a4a10ef9a1d92bf353f9ed306afb355f5a Mon Sep 17 00:00:00 2001 From: Joshua Judson Rosen Date: Mon, 27 Mar 2017 00:48:02 -0400 Subject: 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. --- src/main.c | 7 ------- 1 file changed, 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(); } -- cgit v1.1