Beispiel #1
0
/*! \brief Check if working with directory Check whether name is a directory. 
   \param[out] dst \param dir Parent directory name \param[in,out] name Child
   file/directory name \param stamp Time stamp applied to the parent directory 
   \param ornamelen Length of the child file/directory name without the
   version suffix \retval ZFS_OK Child is a directory; dst is filled in and
   name suffix is truncated \retval ENOENT Child in not a directory */
int32_t
version_is_directory(string * dst, char *dir, string * name, time_t stamp,
					 time_t * dirstamp, int orgnamelen)
{
	char *x;
	struct stat st;

	x = xstrconcat(dir, name->str, NULL);
	if (orgnamelen)
		x[strlen(dir) + orgnamelen] = '\0';

	if (!lstat(x, &st) && S_ISDIR(st.st_mode))
	{
		// it is a directory
		dst->str = x;
		dst->len = strlen(dst->str);
		free(dir);

		if (orgnamelen)
		{
			if (dirstamp)
				*dirstamp = stamp;
			name->str[orgnamelen] = '\0';
			name->len = orgnamelen;
		}

		RETURN_INT(ZFS_OK);
	}

	free(x);

	RETURN_INT(ENOENT);
}
Beispiel #2
0
/*! \brief Close version file Close version file of the specified current
   file.  \param fh Internal file handle of the file \param tidy Whether the
   function should make the version file sparse. */
int32_t version_close_file(internal_fh fh, bool tidy)
{
	message(LOG_DEBUG, FACILITY_VERSION, "version_close_file: version_fd=%d\n",
			fh->version_fd);

	if (fh->version_fd < 0)
		RETURN_INT(ZFS_INVALID_REQUEST);

	close(fh->version_fd);
	fh->version_fd = -1;

	version_set_time(fh);

	free(fh->version_path);
	fh->version_path = NULL;

	if (tidy)
	{
		if (WAS_FILE_TRUNCATED(fh))
		{
			// version_make_sparse();
			UNMARK_FILE_TRUNCATED(fh);
		}
	}

	RETURN_INT(ZFS_OK);
}
Beispiel #3
0
/*! \brief Generate file version specifier Add a version suffix to the
   specified file path. Suffix is generated from the current time.  \param
   path Complete file path.  \param[out] verpath Complete file path including
   a version suffix. */
int32_t version_generate_filename(char *path, string * verpath)
{
	time_t t;
	char stamp[VERSION_MAX_SPECIFIER_LENGTH];	// even unsigned long long int 
												// 
	// will fit in here

	// get current time
	if (time(&t) == -1)
	{
		message(LOG_WARNING, FACILITY_VERSION,
				"version_generate_filename: time returned error=%d\n", errno);
		RETURN_INT(errno);
	}

	// convert to string
	sprintf(stamp, "%ld", t);

	verpath->str = xstrconcat(path, VERSION_NAME_SPECIFIER_S, stamp, NULL);
	verpath->len = strlen(verpath->str);

	message(LOG_DEBUG, FACILITY_VERSION,
			"version_generate_filename: path=%s, stamp=%s\n", path, stamp);

	RETURN_INT(ZFS_OK);
}
/*
 * public native int preloadClasses()
 */
static void Dalvik_dalvik_system_VMRuntime_preloadClasses(const u4* args,
		JValue* pResult)
{
    ClassObject* caller = dvmGetCallerClass(dvmThreadSelf()->curFrame);
	Object* loader;
	int count = 0;
	unsigned int index;

    UNUSED_PARAMETER(args);

	if (caller == NULL)
		RETURN_INT(0);

    loader = (Object*)caller->classLoader;

	for (index = 0; index < sizeof(preloadClassesTable)/sizeof(char*); index ++)
	{
		ClassObject* clazz = dvmFindClassByCstrName(preloadClassesTable[index], loader);
		if (clazz == NULL)
		{
			dvmLogExceptionStackTrace();
			dvmClearException(dvmThreadSelf());
			continue;
		}
		count ++;
	}

    RETURN_INT(count);
}
Beispiel #5
0
/*! \brief Remove all version files from a directory Remove all version files 
   from specified directory. This function is called from rmdir operations to
   make sure all files are deleted even version files are not displayed. Works 
   correctly only if there are no other files but versions. \param path
   Complete path to the directory */
int32_t version_rmdir_versions(char *path)
{
	int32_t r;
	int working = 1;

	ZFS_DIR * dirp = zfs_opendir(path);
	if (dirp == NULL)
		RETURN_INT(errno);
	
	long dir_start_pos = zfs_telldir(dirp);

	while (working)
	{

		/* Always start from the beginning. We are modifying the contents of
		   the directory. And deleting files, so we will continue until there
		   are no (version) files. */
		zfs_seekdir(dirp, dir_start_pos);

		/* Comments to the work with getdents can be found in other functions. 
		 */

		zfs_dirent entry, *de;
		r = zfs_readdir_r(dirp, &entry, &de);
		if (r > 0)
		{
			zfs_closedir(dirp);
			RETURN_INT(r);
		}
		else if (r == 0 && de == NULL) // end of list
		{
			break;
		}

		/* If we delete at least one file, we should start over again.  */
		working = 0;

		/* Hide version files or convert their names or select them for
		   storage.  */
		if (strchr(de->d_name, VERSION_NAME_SPECIFIER_C))
		{
			char *f;
			f = xstrconcat(path, DIRECTORY_SEPARATOR, de->d_name, NULL);
			unlink(f);
			free(f);
			working = 1;
		}

	}

	zfs_closedir(dirp);

	RETURN_INT(ZFS_OK);
}
Beispiel #6
0
PyObject* graph_get_color(PyObject* self, PyObject* pyobject) {
   INIT_SELF_GRAPH();
   if(is_NodeObject(pyobject)) {
      RETURN_INT(so->_graph->get_color(((NodeObject*)pyobject)->_node));
   }
   else {
      GraphDataPyObject a(pyobject);
      RETURN_INT(so->_graph->get_color(&a));
   }

}
Beispiel #7
0
/*! \brief Create version during rename Create version file during file
   rename.  \param path Complete path of the file */
int32_t version_rename_source(char *path)
{
	string verpath;
	int fd, fdv;
	struct stat st, stv;
	struct utimbuf t;
	int32_t r;

	// skip directories
	lstat(path, &st);
	if (S_ISDIR(st.st_mode))
		RETURN_INT(ZFS_OK);

	version_generate_filename(path, &verpath);
	// is there any version we should use?
	r = lstat(verpath.str, &stv);
	if (r == 0)
	{
		// open last version
		fdv = open(verpath.str, O_RDWR);
	}
	else
	{
		fdv = creat(verpath.str, st.st_mode);
		int tmp = lchown(verpath.str, st.st_uid, st.st_gid);
		if (tmp == -1)
		{
			message(LOG_ERROR, FACILITY_VERSION,
					"lchown(\"%s\", %d, %d) has failed errno=%d (%s)\n",
					verpath.str, st.st_uid, st.st_gid,
					errno, strerror(errno));
		}
	}

	fd = open(path, O_RDONLY);

	r = version_copy_data(fd, fdv, 0, st.st_size, NULL);

	close(fd);
	close(fdv);

	t.actime = st.st_atime;
	t.modtime = st.st_mtime;
	utime(verpath.str, &t);

	free(verpath.str);

	RETURN_INT(r);
}
Beispiel #8
0
/*! \brief Perform file unlink with versioning Perform file unlink, i.e.
   rename current file to the version file.  \param path Complete path of the
   file */
int32_t version_unlink_file(char *path)
{
	string verpath;
	struct stat st;

	// skip directories
	if (!lstat(path, &st) && S_ISDIR(st.st_mode))
		RETURN_INT(ZFS_OK);

	version_generate_filename(path, &verpath);
	rename(path, verpath.str);
	free(verpath.str);

	RETURN_INT(ZFS_OK);
}
Beispiel #9
0
/*! \brief Open version file Open version file for specified current file. If 
   the appropriate version already exists, it is opened. New version file is
   created otherwise.  \param denty Dentry of the file \param vol Volume of
   the file */
int32_t version_create_file(internal_dentry dentry, volume vol)
{
	string path;
	string verpath;
	int r;
	struct stat st;

	message(LOG_DEBUG, FACILITY_VERSION, "version_create_file\n");

	build_local_path(&path, vol, dentry);
	version_generate_filename(path.str, &verpath);

	// is there any version we should use?
	r = lstat(verpath.str, &st);
	if (r == 0)
	{
		// open last version
		message(LOG_DEBUG, FACILITY_VERSION, "open last version\n");
		dentry->fh->version_fd = open(verpath.str, O_RDWR);
		dentry->fh->version_path = xstrdup(verpath.str);
	}
	else
	{
		version_create_file_with_attr(verpath.str, dentry, vol, &path);
		version_apply_retention(dentry, vol);
	}

	free(verpath.str);
	free(path.str);

	version_load_interval_tree(dentry->fh);

	RETURN_INT(ZFS_OK);
}
/*
 * native void nativeSetTargetHeapMinFree()
 *
 * Sets the current MIN_FREE, represented as a number
 * for byte size.  Returns the old MIN_FREE.
 *
 * Note that this is NOT static.
 */
static void Dalvik_dalvik_system_VMRuntime_nativeSetTargetHeapMinFree(
    const u4* args, JValue* pResult)
{
    dvmSetTargetHeapMinFree(args[1]);

    RETURN_INT(dvmGetTargetHeapMinFree());
}
/*
 * private static native int arrayBaseOffset0(Class clazz);
 */
static void Dalvik_sun_misc_Unsafe_arrayBaseOffset0(const u4* args,
    JValue* pResult)
{
    // The base offset is not type-dependent in this vm.
    UNUSED_PARAMETER(args);
    RETURN_INT(OFFSETOF_MEMBER(ArrayObject, contents));
}
/*
 * native void nativeSetTargetHeapConcurrentStart()
 *
 * Sets the current concurrentStart, represented as a number
 * for byte size.  Returns the old concurrentStart.
 *
 * Note that this is NOT static.
 */
static void Dalvik_dalvik_system_VMRuntime_nativeSetTargetHeapConcurrentStart(
    const u4* args, JValue* pResult)
{
    dvmSetTargetHeapConcurrentStart(args[1]);

    RETURN_INT(dvmGetTargetHeapConcurrentStart());
}
Beispiel #13
0
argument
set_size(EXTERNAL_ARG(s))
{
   DECLARE_SET(s);
   const vm::int_val size(s->get_size());
   RETURN_INT(size);
}
/*
 * static int getMethodTracingMode()
 *
 * Determine whether method tracing is currently active and what type is active.
 */
static void Dalvik_dalvik_system_VMDebug_getMethodTracingMode(const u4* args,
    JValue* pResult)
{
    UNUSED_PARAMETER(args);

    RETURN_INT(dvmGetMethodTracingMode());
}
/*
 * static boolean nativeLoad(String filename, ClassLoader loader)
 *
 * Load the specified full path as a dynamic library filled with
 * JNI-compatible methods.
 */
static void Dalvik_java_lang_Runtime_nativeLoad(const u4* args,
    JValue* pResult)
{
    StringObject* fileNameObj = (StringObject*) args[0];
    Object* classLoader = (Object*) args[1];
    char* fileName;
    int result;

    if (fileNameObj == NULL)
        RETURN_INT(false);
    fileName = dvmCreateCstrFromString(fileNameObj);

    result = dvmLoadNativeCode(fileName, classLoader);

    free(fileName);
    RETURN_INT(result);
}
Beispiel #16
0
// this function only read dir, is compleet?
int32_t version_apply_retention(internal_dentry dentry, volume vol)
{
	string dpath;
	int32_t r;

	acquire_dentry(dentry->parent);
	build_local_path(&dpath, vol, dentry->parent);
	release_dentry(dentry->parent);

	ZFS_DIR * dirp = zfs_opendir(dpath.str);
	free(dpath.str);
	if (dirp == NULL)
	{
		RETURN_INT(errno);
	}

	/* Create a list of all versions for specified file.  */
	while (0)
	{
		zfs_dirent entry, *de;
		r = zfs_readdir_r(dirp, &entry, &de);
		if (r > 0) // zfs_readdir_r has failed
		{
			zfs_closedir(dirp);
			RETURN_INT(r);
		}
		else if (r == 0 && de == NULL) // end of list
		{
			break;
		}
		//DO NOTTING HILL PLEASE
	}

	zfs_closedir(dirp);

	/* Sort versions.  */

	/* Process from the oldest and check if it violates any maximum, while
	   complying with minimums. Delete such versions. */

	// xstrconcat(dpath.str, DIRECTORY_SEPARATOR, name, NULL);
	// unlink()


	RETURN_INT(ZFS_OK);
}
Beispiel #17
0
/*
 * public native int getInt(Object obj, long offset);
 */
static void Dalvik_sun_misc_Unsafe_getInt(const u4 *args, JValue *pResult) {
    // We ignore the this pointer in args[0].
    Object *obj = (Object *) args[1];
    s8 offset = GET_ARG_LONG(args, 2);
    s4 *address = (s4 *) (((u1 *) obj) + offset);

    RETURN_INT(*address);
}
Beispiel #18
0
/*
 * $dbmctl(OPEN type filename)
 *	Open a DBM file for read and write access.
 * $dbmctl(OPEN_READ type filename)
 *	Open a DBM file for read-only access.
 * $dbmctl(CLOSE refnum)
 *	Close a previously opened DBM file
 * $dbmctl(ADD refnum "key" data)
 *	Insert a new key/data pair.  Fail if key already exists.
 * $dbmctl(CHANGE refnum "key" data)
 *	If key already exists, change its data.  If it doesn't exist, add it.
 * $dbmctl(DELETE refnum "key")
 *	Remove a key/data pair
 * $dbmctl(READ refnum "key")
 *	Return the data for a key.
 * $dbmctl(NEXT_KEY refnum start-over)
 *	Return the next key in the database
 * $dbmctl(ALL_KEYS refnum)
 *	Return all keys -- could be huge! could take a long time!
 * $dbmctl(ERROR refnum)
 *	Return the errno for the last error.
 *
 * "refnum" is a value returned by OPEN and OPEN_READ.
 * "type" must always be "STD" for now. 
 * "filename" is a dbm file (without the .db extension!)
 * "key" is a dbm key.  Spaces are important!
 * "data" is a dbm value.  Spaces are important!
 * 
 */
char *	dbmctl (char *input)
{
	char *	listc;
	int	refnum;
	char *	type;
	char *	key;
	int	retval;
	char *	retstr;

	GET_FUNC_ARG(listc, input);
	if (!my_strnicmp(listc, "OPEN", 4)) {
		GET_FUNC_ARG(type, input);	/* Ignored for now */
		retval = open_dbm(input, 0, 0);
		RETURN_INT(retval);
	} else if (!my_strnicmp(listc, "OPEN_READ", 5)) {
		GET_FUNC_ARG(type, input);	/* Ignored for now */
		retval = open_dbm(input, 1, 0);
		RETURN_INT(retval);
	} else if (!my_strnicmp(listc, "CLOSE", 2)) {
		GET_INT_ARG(refnum, input);
		retval = close_dbm(refnum);
		RETURN_INT(retval);
	} else if (!my_strnicmp(listc, "ADD", 2)) {
		GET_INT_ARG(refnum, input);
		GET_DWORD_ARG(key, input);
		retval = write_to_dbm(refnum, key, input, 0);
		RETURN_INT(retval);
	} else if (!my_strnicmp(listc, "CHANGE", 2)) {
		GET_INT_ARG(refnum, input);
		GET_DWORD_ARG(key, input);
		retval = write_to_dbm(refnum, key, input, 1);
		RETURN_INT(retval);
	} else if (!my_strnicmp(listc, "DELETE", 1)) {
		GET_INT_ARG(refnum, input);
		GET_DWORD_ARG(key, input);
		retval = delete_from_dbm(refnum, key);
		RETURN_INT(retval);
	} else if (!my_strnicmp(listc, "READ", 1)) {
		GET_INT_ARG(refnum, input);
		GET_DWORD_ARG(key, input);
		retstr = read_from_dbm(refnum, key);
		RETURN_MSTR(retstr);
	} else if (!my_strnicmp(listc, "NEXT_KEY", 1)) {
		int	restart;
		GET_INT_ARG(refnum, input);
		GET_INT_ARG(restart, input);
		retstr = iterate_on_dbm(refnum, restart);
		RETURN_MSTR(retstr);
	} else if (!my_strnicmp(listc, "ALL_KEYS", 2)) {
		GET_INT_ARG(refnum, input);
		retstr = all_keys_for_dbm(refnum);
		RETURN_MSTR(retstr);
	} else if (!my_strnicmp(listc, "ERROR", 1)) {
		GET_INT_ARG(refnum, input);
		retval = error_from_dbm(refnum);
		RETURN_INT(retval);
	}

	RETURN_EMPTY;
}
Beispiel #19
0
/*! \brief Perform file truncate with versioning Perform file truncate, i.e.
   rename current file to the version file and create new current file. \param
   dentry Dentry of the file \param path Complete path of the file */
int32_t version_truncate_file(internal_dentry dentry, volume vol, char *path)
{
	string verpath;

	// skip copy if version file already in use - it has all original
	// attributes
	if (dentry->fh->version_fd > 0)
		RETURN_INT(ZFS_OK);

	version_generate_filename(path, &verpath);
	rename(path, verpath.str);
	free(verpath.str);
	version_create_file_with_attr(path, dentry, vol, NULL);
	MARK_FILE_TRUNCATED(dentry->fh);
	version_close_file(dentry->fh, false);

	RETURN_INT(ZFS_OK);
}
/*
 * static int getMethodModifiers(Class decl_class, int slot)
 *
 * (Not sure why the access flags weren't stored in the class along with
 * everything else.  Not sure why this isn't static.)
 */
static void Dalvik_java_lang_reflect_Method_getMethodModifiers(const u4* args,
    JValue* pResult)
{
    ClassObject* declaringClass = (ClassObject*) args[0];
    int slot = args[1];
    Method* meth;

    meth = dvmSlotToMethod(declaringClass, slot);
    RETURN_INT(dvmFixMethodFlags(meth->accessFlags));
}
Beispiel #21
0
/*
 * public native int getIntVolatile(Object obj, long offset);
 */
static void Dalvik_sun_misc_Unsafe_getIntVolatile(const u4 *args,
                                                  JValue *pResult) {
    // We ignore the this pointer in args[0].
    Object *obj = (Object *) args[1];
    s8 offset = GET_ARG_LONG(args, 2);
    volatile int32_t *address = (volatile int32_t *) (((u1 *) obj) + offset);

    int32_t value = android_atomic_acquire_load(address);
    RETURN_INT(value);
}
Beispiel #22
0
/*
 * $levelctl(LEVELS)
 * $levelctl(ADD name)
 * $levelctl(ALIAS old-name new-name)
 * $levelctl(LOOKUP name-or-number)
 * $levelctl(NORMALIZE string)
 */
char *levelctl	(char *input)
{
	char	*listc, *retval;
	const char *newlevel, *oldlevel;
	int	oldnum, newnum;

	GET_FUNC_ARG(listc, input);
        if (!my_strnicmp(listc, "LEVELS", 2)) {
		retval = get_all_levels();
		RETURN_MSTR(retval);
        } else if (!my_strnicmp(listc, "ADD", 2)) {
		GET_FUNC_ARG(newlevel, input);
		newnum = add_new_level(newlevel);
		RETURN_INT(newnum);
        } else if (!my_strnicmp(listc, "ALIAS", 2)) {
		GET_FUNC_ARG(oldlevel, input);
		GET_FUNC_ARG(newlevel, input);
		oldnum = str_to_level(oldlevel);
		newnum = add_new_level_alias(oldnum, newlevel);
		RETURN_INT(newnum);
        } else if (!my_strnicmp(listc, "LOOKUP", 2)) {
		GET_FUNC_ARG(newlevel, input);
		if (is_number(newlevel)) {
			oldnum = STR2INT(newlevel);
			oldlevel = level_to_str(oldnum);
			RETURN_STR(oldlevel);
		} else {
			oldnum = str_to_level(newlevel);
			RETURN_INT(oldnum);
		}
        } else if (!my_strnicmp(listc, "NORMALIZE", 1)) {
		Mask m;
		const char *r;
		char *err = NULL;

		mask_unsetall(&m);
		str_to_mask(&m, input, &err);	/* Errors are ignored */
		r = mask_to_str(&m);
		RETURN_STR(r);
	}

        RETURN_EMPTY;
}
/*
 * public int getFieldModifiers(Class declaringClass, int slot)
 */
static void Dalvik_java_lang_reflect_Field_getFieldModifiers(
    const u4* args, JValue* pResult)
{
    // ignore thisPtr in args[0]
    ClassObject* declaringClass = (ClassObject*) args[1];
    int slot = args[2];
    Field* field;

    field = dvmSlotToField(declaringClass, slot);
    RETURN_INT(field->accessFlags & JAVA_FLAGS_MASK);
}
/*
 * static int getLoadedClassCount()
 *
 * Return the number of loaded classes
 */
static void Dalvik_dalvik_system_VMDebug_getLoadedClassCount(const u4* args,
    JValue* pResult)
{
    int count;

    UNUSED_PARAMETER(args);

    count = dvmGetNumLoadedClasses();

    RETURN_INT(count);
}
/*
 * public int getConstructorModifiers(Class declaringClass, int slot)
 */
static void Dalvik_java_lang_reflect_Constructor_getConstructorModifiers(
    const u4* args, JValue* pResult)
{
    // ignore thisPtr in args[0]
    ClassObject* declaringClass = (ClassObject*) args[1];
    int slot = args[2];
    Method* meth;

    meth = dvmSlotToMethod(declaringClass, slot);
    RETURN_INT(dvmFixMethodFlags(meth->accessFlags));
}
Beispiel #26
0
/*
 * static int setAllocationLimit(int limit)
 *
 * Set the current allocation limit in this thread.  Return the previous
 * value.
 */
static void Dalvik_dalvik_system_VMDebug_setAllocationLimit(const u4* args,
    JValue* pResult)
{
#if defined(WITH_ALLOC_LIMITS)
    gDvm.checkAllocLimits = true;

    Thread* self = dvmThreadSelf();
    int newLimit = args[0];
    int oldLimit = self->allocLimit;

    if (newLimit < -1) {
        LOGE("WARNING: bad limit request (%d)\n", newLimit);
        newLimit = -1;
    }
    self->allocLimit = newLimit;
    RETURN_INT(oldLimit);
#else
    UNUSED_PARAMETER(args);
    RETURN_INT(-1);
#endif
}
Beispiel #27
0
/*
 * static int setGlobalAllocationLimit(int limit)
 *
 * Set the allocation limit for this process.  Returns the previous value.
 */
static void Dalvik_dalvik_system_VMDebug_setGlobalAllocationLimit(const u4* args,
    JValue* pResult)
{
#if defined(WITH_ALLOC_LIMITS)
    gDvm.checkAllocLimits = true;

    int newLimit = args[0];
    int oldLimit = gDvm.allocationLimit;

    if (newLimit < -1 || newLimit > 0) {
        LOGE("WARNING: bad limit request (%d)\n", newLimit);
        newLimit = -1;
    }
    // TODO: should use an atomic swap here
    gDvm.allocationLimit = newLimit;
    RETURN_INT(oldLimit);
#else
    UNUSED_PARAMETER(args);
    RETURN_INT(-1);
#endif
}
Beispiel #28
0
/*! \brief Delete version file Delete version file and its respective
   interval file.  \param path Complete path of the file */
int32_t version_unlink_version_file(char *path)
{
	int32_t r;
	char *x;

	// unlink both version file and interval file
	x = xstrconcat(path, VERSION_INTERVAL_FILE_ADD, NULL);
	unlink(x);
	free(x);

	r = unlink(path);

	RETURN_INT(r);
}
/*
 * public int availableProcessors()
 *
 * Returns the number of online processors, at least one.
 *
 */
static void Dalvik_java_lang_Runtime_availableProcessors(const u4* args,
    JValue* pResult)
{
    long result = 1;
#ifdef _SC_NPROCESSORS_ONLN
    result = sysconf(_SC_NPROCESSORS_ONLN);
    if (result > INT_MAX) {
        result = INT_MAX;
    } else if (result < 1 ) {
        result = 1;
    }
#endif
    RETURN_INT((int)result);
}
Beispiel #30
0
/*
 * void getStatus()
 *
 * Gets the Thread status. Result is in VM terms, has to be mapped to
 * Thread.State by interpreted code.
 */
static void Dalvik_java_lang_VMThread_getStatus(const u4* args, JValue* pResult)
{
    Object* thisPtr = (Object*) args[0];
    Thread* thread;
    int result;

    dvmLockThreadList(NULL);
    thread = dvmGetThreadFromThreadObject(thisPtr);
    if (thread != NULL)
        result = thread->status;
    else
        result = THREAD_ZOMBIE;     // assume it used to exist and is now gone
    dvmUnlockThreadList();

    RETURN_INT(result);
}