>2009/4/10 yihect <[email protected]>:
>> Hi, all:
>> Im my device, there are many registers resider in several banks, these
>> registers are all
>
>Banks?? What is meant by that? Can you explain?
>
Yes, the device is connected by HPI interface. All registers are classified
purpose.
When app want to access one register, it must specify bank ID in which the
register be
placed.
>> accessed by one IOCTL cmd in my driver. And there are 2 or 3 tasks will
>> access these registers simultaneously in app layer.
>>
>> So, my question is: Is there some common model to do this kind of
>> concurrent control? Is there some sample as reference?
>
>Use mutexes if your user space app can tolerate to block.
>
En, this is the method what I want to use. The question is all registers are
all accessed by
the only ioctl cmd. If one process want to do jobs that need to access a
series of registers,
the performance will affected internally due to frequent user-kernel-space
switch.
So, if we use mutex/semaphore in ioctl level directly, is the performance will
become worse?
Is this true? Is there any better solutions for this?
>HTH
>
>Thanks,
>> Any suggestion will be welcome also.
>>
>
N§²æìr¸yúèØb²X¬¶Ç§u©Þ¨¥Â+aº{.nÇ+·¤z¹Þw°n'¬¶j»b²ye{±¢¸æ¬z·vØ^¶m§ÿäz¹Þw°n'¬¢¸?