#include <rtl_conf.h>
#include <time.h>
#include <pthread.h>
#include <rtl_ipc.h>
#include <semaphore.h>
#include <rtl_barrier.h>
#include <rtl_printf.h>
#include <unistd.h>
#include "examples.h"

#if POSIXIO_EXAMPLE 

static unsigned long valor10=0x0;


pthread_t thread10;

extern unsigned long mprot_prueba;
extern unsigned long context_mprot_prueba;
void *task10(void *arg)
{
  int fd;
  char str1 [] = "This is the RT-TERMINAL\nTHIS component uses VT100 ESC commands.\x1B[3;0H\x1B[34;47mYou\x1B[31;44mcan\x1B[36;41mchange\x1B[30;42measily\x1B[34;47mthe\x1B[32;40mcolors\x1B[10;10H\x1B[34;43mOr you can move by the screen";

#if _RTL_POSIX_IO 
//  fd = open("/dev/mem",0);
//  lseek(fd,0xb8000,0);
//  write(fd,"pxrxuxexbxax",12);
//  close(fd);
#endif
  rtl_printf(str1);
  while(1)
  { 
   rtl_printf("Prueba rtl_printf %d\n",valor10);
   valor10++;
   usleep(5000000);
  };
  
  return 0;
};





#endif
