Installing a new software ISR in Android

by Kosh » Fri, 04 Sep 2009 19:16:30 GMT


Sponsored Links
 Hi all,

I want to develop a little app, which on a condition makes a system
call to android Kernel. The Kernel then executes this interrupt
routine.

Any suggestions how to go about it?

--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---



Installing a new software ISR in Android

by San Mehat » Fri, 04 Sep 2009 19:24:25 GMT


 


And what does this interrupt routine do? :)




-- 
----------
San Mehat
Staff Software Engineer
Google Inc.
o: 650-253-7422
c: 408-382-1249
s...@google.com

--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---


Sponsored Links


Other Threads

1. glTexImage2D is too slow,who can help me,please

when draw YUV frame use opengl 2.0 and shader on nexus one,but the
function  glTexImage2D is too slow ,cost 40-60 ms
who can fix it ? the key codes:
-------------------------------------------------

int CreateSimpleTexture2D()
       {
               int err, i;



               for (i=0; i<3;i++)
               {
                       glGenTextures(1, &userData.textureId[i]);
                       if (err = glGetError()) {
                       //      NSLog(@"Error: Could not generate
texture: %d", err);

__android_log_print(ANDROID_LOG_ERROR,"CreateSimpleTexture2D","Error:
Could not generate texture: %d", err);
                               return 0;
                       }

                       glBindTexture(GL_TEXTURE_2D, userData.textureId[i]);
                       if (err = glGetError()) {
                       //      NSLog(@"Error: Could not bind texture: %d", err);

__android_log_print(ANDROID_LOG_ERROR,"CreateSimpleTexture2D","Error:
Could not bind texture: %d", err);
                               return 0;
                       }
               }

               glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
               if (err = glGetError()) {
                       //NSLog(@"Error: Could not set texture
minimization filter: %d", err);

__android_log_print(ANDROID_LOG_ERROR,"CreateSimpleTexture2D","Error:
Could not set texture minimization filter: %d", err);
                       return 0;
               }

               glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
               if (err = glGetError()) {
               //      NSLog(@"Error: Could not set texture
magnification filter: %d", err);
               
__android_log_print(ANDROID_LOG_ERROR,"CreateSimpleTexture2D","Error:
Could not set texture magnification filter: %d", err);
                       return 0;
               }

               glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S,
GL_CLAMP_TO_EDGE);
               glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T,
GL_CLAMP_TO_EDGE);
               glGenerateMipmap(GL_TEXTURE_2D);
               return 1;
       }


---------------------------------------render frame
-------------------------------------------------
               glViewport ( 0, 0, g_WindowsWidth, g_WindowsHeight );
               checkGlError("glViewport");
               //glDrawBuffer(GL_COLOR_ATTACHMENT0);
               // Clear the color buffer
               glClear ( GL_COLOR_BUFFER_BIT );
               checkGlError("glClear");
               // Use the program object
               glUseProgram ( userData.programObject );
               checkGlError("glUseProgram");
               // Load the vertex position
               glVertexAttribPointer ( userData.positionLoc, 3, GL_FLOAT,
                                                          GL_FALSE, 5
* sizeof(GLfloat), vVertices );
               // Load the texture coordinate
               glVertexAttribPointer ( userData.texCoordLoc, 2, GL_FLOAT,
                                                          GL_FALSE, 5
* sizeof(GLfloat), &vVertices[3] );

               glEnableVertexAttribArray ( userData.positionLoc );
               glEnableVertexAttribArray ( userData.texCoordLoc );

               long long  ttttttt=av_gettime();
               // Bind the texture
               glActiveTexture ( GL_TEXTURE1 );
               glBindTexture ( GL_TEXTURE_2D, userData.textureId[1] );
               glUniform1i ( userData.samplerLocU, 1);
               glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
               glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
               glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S,
GL_CLAMP_TO_EDGE);
               glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T,
GL_CLAMP_TO_EDGE);
               //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
               //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
               //glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);

               //glPixelStorei(GL_UNPACK_ALIGNMENT,1);

               glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE, width/2,
height/2, 0,
GL_LUMINANCE, GL_UNSIGNED_BYTE, pict->data[1]);
               checkGlError("glTexImage2D....pict->data[1]");
               //glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE, width*0.5,
height*0.5, 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, pict->data[1]);


               // Bind the texture
               glActiveTexture ( GL_TEXTURE2 );
               glBindTexture ( GL_TEXTURE_2D, userData.textureId[2] );
               glUniform1i ( userData.samplerLocV, 2);
               glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
               glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
               glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S,
GL_CLAMP_TO_EDGE);
               glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T,
GL_CLAMP_TO_EDGE);
               //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
               //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
               //glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
               //glPixelStorei(GL_UNPACK_ALIGNMENT,1);


               glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE,width/2, height/2, 0,
GL_LUMINANCE, GL_UNSIGNED_BYTE, pict->data[2]);

               checkGlError("glTexImage2D....pict->data[2]");
               // Set the sampler texture unit to 0
               glActiveTexture ( GL_TEXTURE0 );
               glBindTexture ( GL_TEXTURE_2D, userData.textureId[0] );
               glUniform1i ( userData.samplerLocY, 0);
               glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
               glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
               glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S,
GL_CLAMP_TO_EDGE);
               glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T,
GL_CLAMP_TO_EDGE);
               //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
               //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
               //glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
               //glPixelStorei(GL_UNPACK_ALIGNMENT,1);


               glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE, width, height, 0,
GL_LUMINANCE, GL_UNSIGNED_BYTE, pict->data[0]);
               
__android_log_print(ANDROID_LOG_ERROR,"GPU","%lld",(av_gettime()-ttttttt)/1000);
               checkGlError("glTexImage2D....pict->data[0]");
               glDrawElements ( GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, indices );

-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

2. Update WTS: Desire + Nexus seken

Sori saya update di milis..
Karena banyak yang japri. 
Yang deal pertama langsung deal
Yang minat tapi pake tanya sori kena skip :)


@yopiesuryadi
hope for a better future 
http://bit.ly/9KHYOI

-----Original Message-----
From: "yopie suryadi" <yo...@anjroid.net>
Date: Fri, 19 Nov 2010 00:15:57 
To: Idandroid<id-android@googlegroups.com>; 
Isat-android<isat-andr...@googlegroups.com>
Reply-To: yo...@anjroid.net
Subject: WTS: Desire + Nexus seken

Permisi...
Saya mau jualan ni

- desire seken supermulus komplit 4jt aja
- nexus supermulus (mint condition) 4,1jt aja
- motorola backflip supermulus 2,3jt aja

Bnib:
- htc desire
- motorola backflip

Harga sudah nett. 
No nego sama sekali. 
Yang nego saya skip...

Minat harap japri ke yo...@ratjoen.com atau telp langsung (no sms). 

Thanks


@yopiesuryadi
hope for a better future 
http://bit.ly/9KHYOI

-- 
===============
"Indonesian Android Community [id-android]"

PING'S mobile
Email: sa...@pings-mobile.com  Ph. (021) 96087100
---------------------
Yopie Ratjoen
Email: yo...@ratjoen.com  Ph. 08977726681
--------------------
Gila original
Email: i...@gilaoriginal.com  Ph. (031) 91555898
--------------------

Aturan Jual/Kloteran ID-Android  http://goo.gl/azW7

3. This Weekend Prize

4. (WTA n Share) tanya2 seputar samsung epic 4g

5. ClassNotFoundException for a compiled class

6. System.nanoTime() for Dual Core processors

7. Pendatang baru nih