Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Multithreaded access to PCI bus: (1 Item)
   
Multithreaded access to PCI bus  
Hi All

Please can someone confirm whether there is or is not an issue when accessing a PCI bus device from different threads. 
In my application, I intend to connect to a PCI bus attached FPGA using;

pci_attach_device( NULL,(PCI_SHARE | PCI_SEARCH_VENDEV | PCI_INIT_ALL),0,&PCI_device_info );

I then hope to map the device into memory using;

mmap_device_memory( NULL,PCI_device_info.BaseAddressSize[1], PROT_READ | PROT_WRITE | PROT_NOCACHE, MAP_SHARED,
PCI_device_info.CpuBaseAddress[1] );

Then access the memory as if it were ordinary memory. I want to be sure that there is no issue with different threads 
accessing different parts of the mapped memory when running on a multicore SMP system. Can I assume the OS / BIOS will 
manage the PCI bus access to separate mapped areas by separate threads? Obviously if the threads need to access the same
 memory mapped location then I would need to prevent simultaneous access. But do I need to prevent simultaneous access 
to different mapped areas?

Kindest regards,
Alastair

--------------------------------------------------------------------------------------------------
This email and any attachments are confidential and are for the use of the
addressee only. If you are not the addressee, you must not use or disclose the
contents to any other person. Please immediately notify the sender and
delete the email. Statements and opinions expressed here may not
represent those of the company. Email correspondence is monitored by
the company. This information may be subject to export control
regulation. You are obliged to comply with such regulations.

Renishaw plc (company number 1106260) and Wotton Travel Limited (company
number 01973158) are companies registered in England and Wales with a registered office
at New Mills, Wotton-under-Edge, Gloucestershire, GL12 8JR,
United Kingdom, Telephone +44 1453 524524.
--------------------------------------------------------------------------------------------------
Attachment: HTML sf-attachment-mime35281 4.41 KB