[freenet-cvs] r17906 - trunk/contrib/NativeThread

nextgens at freenetproject.org nextgens at freenetproject.org
Fri Feb 15 03:30:20 UTC 2008


Author: nextgens
Date: 2008-02-15 03:30:20 +0000 (Fri, 15 Feb 2008)
New Revision: 17906

Removed:
   trunk/contrib/NativeThread/freenet_support_io_NativeThread.c
Modified:
   trunk/contrib/NativeThread/Makefile
Log:
freenet-ext: revert r17905 it was silly

Modified: trunk/contrib/NativeThread/Makefile
===================================================================
--- trunk/contrib/NativeThread/Makefile	2008-02-15 03:15:31 UTC (rev 17905)
+++ trunk/contrib/NativeThread/Makefile	2008-02-15 03:30:20 UTC (rev 17906)
@@ -5,20 +5,19 @@
 LIBS=-static -lc
 FREEENETDIR=/home/nextgens/repo/freenet/
 
-all: clean libNativeThread.so
+all: libNativeThread.so
 
 NativeThread.java:
-	mkdir -p freenet/support/io
-	ln -s $(FREEENETDIR)/src/freenet/support/io/NativeThread.java freenet/support/io
+	ln -s $(FREEENETDIR)/src/freenet/support/io/NativeThread.java
 
 NativeThread.class: NativeThread.java
-	javac freenet/support/io/NativeThread.java
+	javac NativeThread.java
 
-libNativeThread.so: freenet_support_io_NativeThread.c NativeThread.h
-	$(CC) $(CFLAGS) -o libNativeThread.so $(LDFLAGS) freenet_support_io_NativeThread.c $(LIBS)
+libNativeThread.so: NativeThread.c NativeThread.h
+	$(CC) $(CFLAGS) -o libNativeThread.so $(LDFLAGS) NativeThread.c $(LIBS)
 
 NativeThread.h: NativeThread.class
-	javah  freenet.support.io.NativeThread
+	javah NativeThread
 
 clean:
-	-rm -rf freenet *.class *.h libNativeThread*.so NativeThread.java
+	-rm -f *.class NativeThread.h libNativeThread*.so NativeThread.java

Deleted: trunk/contrib/NativeThread/freenet_support_io_NativeThread.c
===================================================================
--- trunk/contrib/NativeThread/freenet_support_io_NativeThread.c	2008-02-15 03:15:31 UTC (rev 17905)
+++ trunk/contrib/NativeThread/freenet_support_io_NativeThread.c	2008-02-15 03:30:20 UTC (rev 17906)
@@ -1,23 +0,0 @@
-#include<sys/resource.h>
-#include<sys/time.h>
-#include<stdio.h>
-#include <errno.h>
-
-#include"freenet_support_io_NativeThread.h"
-
-JNIEXPORT jint JNICALL Java_sandbox_NativeThread_getLinuxPriority
-  (JNIEnv * env, jobject jobj) {
-	return getpriority(PRIO_PROCESS, 0);
-}
-
-JNIEXPORT jboolean JNICALL Java_sandbox_NativeThread_setLinuxPriority
-(JNIEnv * env, jobject jobj, jint prio) {
-	int ret;
-	errno = 0;
-	ret = setpriority(PRIO_PROCESS, 0, prio);
-	if (ret == -1 && errno != 0) {
-		printf("Setting the thread priority failed!! %d %d\n",ret,errno);
-		return JNI_FALSE;
-	}
-	return JNI_TRUE;
-}




More information about the cvs mailing list