Mesa (master): mesa: Remove _mesa_exit wrapper for exit().

Eric Anholt anholt at kemper.freedesktop.org
Tue Dec 22 14:21:03 PST 2009


Module: Mesa
Branch: master
Commit: 1a80fe461e162d5b6e25bd270a54e6662f72e5b3
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=1a80fe461e162d5b6e25bd270a54e6662f72e5b3

Author: Eric Anholt <eric at anholt.net>
Date:   Tue Dec 22 10:56:34 2009 -0800

mesa: Remove _mesa_exit wrapper for exit().

It does nothing else while being less useful than exit() because it lacks
attributes that real exit() has.

---

 src/mesa/drivers/dri/r300/r300_emit.c       |    2 +-
 src/mesa/drivers/dri/r300/r300_state.c      |    2 +-
 src/mesa/drivers/dri/r300/r300_swtcl.c      |    2 +-
 src/mesa/drivers/dri/r300/r300_texstate.c   |    2 +-
 src/mesa/drivers/dri/r300/r300_vertprog.c   |    2 +-
 src/mesa/drivers/dri/radeon/radeon_common.c |    2 +-
 src/mesa/main/ffvertex_prog.c               |    2 +-
 src/mesa/main/imports.c                     |   10 ----------
 src/mesa/main/imports.h                     |    4 ----
 src/mesa/main/texenvprogram.c               |    4 ++--
 src/mesa/math/m_debug_norm.c                |    2 +-
 src/mesa/tnl/t_vertex_generic.c             |    2 +-
 src/mesa/vf/vf_generic.c                    |    2 +-
 13 files changed, 12 insertions(+), 26 deletions(-)

diff --git a/src/mesa/drivers/dri/r300/r300_emit.c b/src/mesa/drivers/dri/r300/r300_emit.c
index 3759ca2..15aeaf0 100644
--- a/src/mesa/drivers/dri/r300/r300_emit.c
+++ b/src/mesa/drivers/dri/r300/r300_emit.c
@@ -117,7 +117,7 @@ GLuint r300VAPOutputCntl1(GLcontext * ctx, GLuint vp_writes)
 
 	if (first_free_texcoord > 8) {
 		fprintf(stderr, "\tout of free texcoords\n");
-		_mesa_exit(-1);
+		exit(-1);
 	}
 
 	return ret;
diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c
index da0a9df..23f81fe 100644
--- a/src/mesa/drivers/dri/r300/r300_state.c
+++ b/src/mesa/drivers/dri/r300/r300_state.c
@@ -1311,7 +1311,7 @@ static void r300SetupTextures(GLcontext * ctx)
 		fprintf(stderr,
 			"Aiiee ! mtu=%d is greater than R300_MAX_TEXTURE_UNITS=%d\n",
 			mtu, R300_MAX_TEXTURE_UNITS);
-		_mesa_exit(-1);
+		exit(-1);
 	}
 
 	/* We cannot let disabled tmu offsets pass DRM */
diff --git a/src/mesa/drivers/dri/r300/r300_swtcl.c b/src/mesa/drivers/dri/r300/r300_swtcl.c
index 383c8a2..93983ce 100644
--- a/src/mesa/drivers/dri/r300/r300_swtcl.c
+++ b/src/mesa/drivers/dri/r300/r300_swtcl.c
@@ -215,7 +215,7 @@ void r300ChooseSwtclVertexFormat(GLcontext *ctx, GLuint *_InputsRead,  GLuint *_
 
 	if (first_free_tex >= ctx->Const.MaxTextureUnits) {
 		fprintf(stderr, "\tout of free texcoords to write fog coordinate\n");
-		_mesa_exit(-1);
+		exit(-1);
 	}
 
 	R300_NEWPRIM(rmesa);
diff --git a/src/mesa/drivers/dri/r300/r300_texstate.c b/src/mesa/drivers/dri/r300/r300_texstate.c
index eea3dee..78ff545 100644
--- a/src/mesa/drivers/dri/r300/r300_texstate.c
+++ b/src/mesa/drivers/dri/r300/r300_texstate.c
@@ -256,7 +256,7 @@ static void setup_hardware_state(r300ContextPtr rmesa, radeonTexObj *t)
 			if (txformat < 0) {
 				_mesa_problem(rmesa->radeon.glCtx, "%s: Invalid format %s",
 							  __FUNCTION__, _mesa_get_format_name(firstImage->TexFormat));
-				_mesa_exit(1);
+				exit(1);
 			}
 			t->pp_txformat = (uint32_t) txformat;
 		}
diff --git a/src/mesa/drivers/dri/r300/r300_vertprog.c b/src/mesa/drivers/dri/r300/r300_vertprog.c
index c2f96af..aa98a04 100644
--- a/src/mesa/drivers/dri/r300/r300_vertprog.c
+++ b/src/mesa/drivers/dri/r300/r300_vertprog.c
@@ -365,7 +365,7 @@ static void r300EmitVertexProgram(r300ContextPtr r300, int dest, struct r300_ver
 			break;
 		default:
 			fprintf(stderr, "%s:%s don't know how to handle dest %04x\n", __FILE__, __FUNCTION__, dest);
-			_mesa_exit(-1);
+			exit(-1);
 	}
 }
 
diff --git a/src/mesa/drivers/dri/radeon/radeon_common.c b/src/mesa/drivers/dri/radeon/radeon_common.c
index 2a2b16a..c0b3165 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common.c
+++ b/src/mesa/drivers/dri/radeon/radeon_common.c
@@ -1230,7 +1230,7 @@ int rcommonFlushCmdBuf(radeonContextPtr rmesa, const char *caller)
 		fprintf(stderr, "drmRadeonCmdBuffer: %d. Kernel failed to "
 				"parse or rejected command stream. See dmesg "
 				"for more info.\n", ret);
-		_mesa_exit(ret);
+		exit(ret);
 	}
 
 	return ret;
diff --git a/src/mesa/main/ffvertex_prog.c b/src/mesa/main/ffvertex_prog.c
index 5cfa898..2d1db29 100644
--- a/src/mesa/main/ffvertex_prog.c
+++ b/src/mesa/main/ffvertex_prog.c
@@ -357,7 +357,7 @@ static struct ureg get_temp( struct tnl_program *p )
    int bit = _mesa_ffs( ~p->temp_in_use );
    if (!bit) {
       _mesa_problem(NULL, "%s: out of temporaries\n", __FILE__);
-      _mesa_exit(1);
+      exit(1);
    }
 
    if ((GLuint) bit > p->program->Base.NumTemporaries)
diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c
index f2ef84f..def0452 100644
--- a/src/mesa/main/imports.c
+++ b/src/mesa/main/imports.c
@@ -1239,13 +1239,3 @@ _mesa_debug( const GLcontext *ctx, const char *fmtString, ... )
 }
 
 /*@}*/
-
-
-/**
- * Wrapper for exit().
- */
-void
-_mesa_exit( int status )
-{
-   exit(status);
-}
diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h
index 7d4012a..b01fe5b 100644
--- a/src/mesa/main/imports.h
+++ b/src/mesa/main/imports.h
@@ -618,10 +618,6 @@ _mesa_error( __GLcontext *ctx, GLenum error, const char *fmtString, ... );
 extern void
 _mesa_debug( const __GLcontext *ctx, const char *fmtString, ... );
 
-extern void 
-_mesa_exit( int status );
-
-
 #ifdef __cplusplus
 }
 #endif
diff --git a/src/mesa/main/texenvprogram.c b/src/mesa/main/texenvprogram.c
index f439d4a..c69e759 100644
--- a/src/mesa/main/texenvprogram.c
+++ b/src/mesa/main/texenvprogram.c
@@ -606,7 +606,7 @@ static struct ureg get_temp( struct texenv_fragment_program *p )
 
    if (!bit) {
       _mesa_problem(NULL, "%s: out of temporaries\n", __FILE__);
-      _mesa_exit(1);
+      exit(1);
    }
 
    if ((GLuint) bit > p->program->Base.NumTemporaries)
@@ -634,7 +634,7 @@ static struct ureg get_tex_temp( struct texenv_fragment_program *p )
 
    if (!bit) {
       _mesa_problem(NULL, "%s: out of temporaries\n", __FILE__);
-      _mesa_exit(1);
+      exit(1);
    }
 
    if ((GLuint) bit > p->program->Base.NumTemporaries)
diff --git a/src/mesa/math/m_debug_norm.c b/src/mesa/math/m_debug_norm.c
index 89c632e..f9b26d8 100644
--- a/src/mesa/math/m_debug_norm.c
+++ b/src/mesa/math/m_debug_norm.c
@@ -230,7 +230,7 @@ static int test_norm_function( normal_func func, int mtype, long *cycles )
          case VAR:
             break;
          default:
-            _mesa_exit(1);
+            exit(1);
          }
       }
    }
diff --git a/src/mesa/tnl/t_vertex_generic.c b/src/mesa/tnl/t_vertex_generic.c
index fa34d11..99ddace 100644
--- a/src/mesa/tnl/t_vertex_generic.c
+++ b/src/mesa/tnl/t_vertex_generic.c
@@ -210,7 +210,7 @@ static INLINE void insert_3f_xyw_err( const struct tnl_clipspace_attr *a, GLubyt
 {
    (void) a; (void) v; (void) in;
    DEBUG_INSERT;
-   _mesa_exit(1);
+   exit(1);
 }
 
 static INLINE void insert_3f_3( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
diff --git a/src/mesa/vf/vf_generic.c b/src/mesa/vf/vf_generic.c
index baa00af..0af8893 100644
--- a/src/mesa/vf/vf_generic.c
+++ b/src/mesa/vf/vf_generic.c
@@ -211,7 +211,7 @@ static INLINE void insert_3f_xyw_4( const struct vf_attr *a, GLubyte *v, const G
 static INLINE void insert_3f_xyw_err( const struct vf_attr *a, GLubyte *v, const GLfloat *in )
 {
    (void) a; (void) v; (void) in;
-   _mesa_exit(1);
+   exit(1);
 }
 
 static INLINE void insert_3f_3( const struct vf_attr *a, GLubyte *v, const GLfloat *in )



More information about the mesa-commit mailing list