Hi I am using STR9 I have to interface it with clrc632 chip that is 14443 based RFID chip previously I have written the driver for the same using linux 2.6 kernel there was an approach in which we devide the lenthy interrupt routene to TOP half and Bottom half now I have to execute 5 tasks in the RTX I want to make the scheduling like that of linux my problem is how to perform lenthy process in interrupt handler is there need of top half and bottom half in kiel?
Top half and bottom half are a way to "cheat" a bit in Linux, since Linux is not an RTOS. Linux can not guarantee that it can switch in a user-space thread/process fast enough so it gives the a driver an alternative way to get processor time, besides the ISR and when called from an application.
In the case of RTX, just write an interrupt handler retrieving the information and let it wake a task to do the actual work.
thanks for reply
I have to run 5 tasks suppose there is a task in which there is a long interrupt routene as I am using task switching for 10 miliseconds suppose in the middle of interrupt routene task switch occurs so what will happen ? means how to save the previous states because I have done a program of GSM modem in which there was a function which was long enough so I had to lock the RTX by tsk_lock before calling it otherwise it was not working
If you are forbidding RTX from switching tasks, then you no longer have an RTOS.
Take a closer look at your code. You can most probably rewrite the code so that it becomes friendlier. The task should work with its own private data structures (which means that a task switch will not allow any other task to see inconsistent data structures) and when done, just flip a flag or similar to publish the work and then start on the next iteration using a second set of variables.
The communication with the modem is serial, so you just push the data into a send queue and let the interrupt send and receive. Your task gets activated when you have received data to process.
And unless you are using a multiplexer (like the GSM 07.10 standard) you should have only one task that is communicating with the modem at any one time. When one task is done, it can of course release the modem to another task.
there is a task in which there is a long interrupt routene
You're not making much sense. Interrupt routines are never "in" any task --- they exist outside the system of tasks.
And you should never have "long interrupt routines". They only cause trouble.