Index: kernel/generic/src/proc/thread.c
===================================================================
--- kernel/generic/src/proc/thread.c	(revision e32e092d6f8bed442ecc81b18af9ef323bc4e650)
+++ kernel/generic/src/proc/thread.c	(revision 4541ae41d7ce895a89a42a784040f0156fb8e79d)
@@ -673,72 +673,4 @@
 }
 
-
-/** Create new user task with 1 thread from image
- *
- * @param program_addr Address of program executable image.
- * @param name Program name.
- *
- * @return Initialized main thread of the task or NULL on error.
- */
-thread_t *thread_create_program(void *program_addr, char *name)
-{
-	as_t *as;
-	as_area_t *area;
-	unsigned int rc;
-	task_t *task;
-	uspace_arg_t *kernel_uarg;
-	
-	kernel_uarg = (uspace_arg_t *) malloc(sizeof(uspace_arg_t), 0);
-	if (kernel_uarg == NULL)
-		return NULL;
-	
-	kernel_uarg->uspace_entry =
-	    (void *) ((elf_header_t *) program_addr)->e_entry;
-	kernel_uarg->uspace_stack = (void *) USTACK_ADDRESS;
-	kernel_uarg->uspace_thread_function = NULL;
-	kernel_uarg->uspace_thread_arg = NULL;
-	kernel_uarg->uspace_uarg = NULL;
-
-	as = as_create(0);
-	if (as == NULL) {
-		free(kernel_uarg);
-		return NULL;
-	}
-
-	rc = elf_load((elf_header_t *) program_addr, as);
-	if (rc != EE_OK) {
-		free(kernel_uarg);
-		as_destroy(as);
-		return NULL;
-	}
-	
-	/*
-	 * Create the data as_area.
-	 */
-	area = as_area_create(as,
-		AS_AREA_READ | AS_AREA_WRITE | AS_AREA_CACHEABLE,
-		LOADED_PROG_STACK_PAGES_NO * PAGE_SIZE, USTACK_ADDRESS,
-		AS_AREA_ATTR_NONE, &anon_backend, NULL);
-	if (area == NULL) {
-		free(kernel_uarg);
-		as_destroy(as);
-		return NULL;
-	} 
-	
-	task = task_create(as, name);
-	if (task == NULL) {
-		free(kernel_uarg);
-		as_destroy(as);
-		return NULL;
-	}
-	
-	/*
-	 * Create the main thread.
-	 */
-	return thread_create(uinit, kernel_uarg, task, THREAD_FLAG_USPACE,
-	    "uinit", false);
-}
-
-
 /** Update accounting of current thread.
  *
